Clang scan-build reports with compiler warnings?

The clang scan-build driver for the static analyzer generates quite html reports. But they contain only those problems that the analyzer detects.

Is there a way to generate the same reports for warnings (and errors) from the compiler itself?

+8
compiler-warnings clang report clang-static-analyzer
source share
1 answer

I did not find documentation about this, so I dug up the clang source code.

It turns out that scan-build and ccc-analyzer (both perl scripts) do not output these error reports. Rather, the generation of HTML reports is actually part of the clang compiler. scan-build script simply links the various output files and adds the report index.

Cm

http://clang.llvm.org/doxygen/HTMLDiagnostics_8cpp_source.html

for Clang source code.

To get the clang for generating HTML reports for common warnings / errors, you will need to use HTMLDiagnostics outside the static analyzer. I know very little about the internal functions of Clang / LLVM, so I'm not sure how much effort it will take.

+2
source share

All Articles