clang-diagnostic-error #3498
-
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
@ningboRainbow
Also if you don't want to see reports from a third party library, you can use skip files during the analysis to skip these reports:
|
Beta Was this translation helpful? Give feedback.
-
CodeChecker uses Clang under the hood for analysis. It could be that your project compiles with GCC but doesn't compile with Clang, because it depends on some GCC-specific things. |
Beta Was this translation helpful? Give feedback.
-
it doesn't work,my command following this: |
Beta Was this translation helpful? Give feedback.
-
In addition, I have another question, after summarizing the current scanning results, i found that the most of types of defects scanned are as follows:
|
Beta Was this translation helpful? Give feedback.
-
These are compiler issues, or issues of layout of the code. It might be that a third-party library is not picked up properly, an include directive is missing which your local compiler automatically puts or understands there, but Clang doesn't. The problem is that if Clang cannot compile the code at hand, it cannot start the analysis properly.
For C/C++ projects, CodeChecker uses the Clang Static Analyser and Clang-Tidy as the two analysis routines. The clang binaries are run from your system's install and There are several checkers, and checker profiles, which can be individually enabled or disabled. There are descriptions about this in the user guide.
These two classes of errors are supported by the Clang Static Analyser, and these should be enabled by default. |
Beta Was this translation helpful? Give feedback.
@ningboRainbow
CodeChecker analyze
command is able to run the analysis in Cross Translation Unit (ctu) mode with the--ctu
option: