clang's scan-build driver for the static analyzer generates pretty html reports. But these only contain the issues the analyzer finds.
Is there way to generate the same kind of reports for warnings (and errors) from the compiler itself?
clang's scan-build driver for the static analyzer generates pretty html reports. But these only contain the issues the analyzer finds.
Is there way to generate the same kind of reports for warnings (and errors) from the compiler itself?
I found no documentation about this, so I dug around the clang source code.
It turns out that scan-build
and ccc-analyzer
(both perl scripts) don't output these error reports. Rather, the generation of the HTML reports is actually part of the clang compiler. The scan-build
script simply ties together the various output files and adds a report index.
See
http://clang.llvm.org/doxygen/HTMLDiagnostics_8cpp_source.html
for the Clang source code.
To get clang to generate HTML reports for normal warnings/errors would require using the HTMLDiagnostics
outside of the static analyzer. I know very little about Clang/LLVM internals, so I'm not sure how much effort this would require.