Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-2228

Lower the level of error related to compiler compatibility, to allow symbolic execution

    Details

      Description

      In clang, symbolic execution rules are skipped as soon as an error happens during AST creation.

      Since we are using clang to analyze some projects that are built by GCC, we sometime have parsing errors in system headers related to compiler intrinsics. Currently, those errors are filtered out on the output:

        llvm::StringRef filename = sourceManager->getFilename(location);
        if (filename.endswith("intrin.h")) {
          return;
        }
      

      But they are still errors, preventing symbolic execution for the whole file.

      Another issue filtered in diag output is clang::diag::err_asm_goto_not_supported_yet.

      Similar to what was done in CPP-2193, we should lower the level of those errors in order to allow clang static analyzer rules to be reported.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                loic.joly Loïc Joly
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: