[cfe-dev] [Bug 8202] I get no reports from running "scan-build <args...> make -k"

Ted Kremenek kremenek at apple.com
Wed Sep 22 16:05:22 PDT 2010


On Sep 22, 2010, at 2:01 PM, Tom Browder wrote:

> I got this response from a bug report filed about the scan-build tool
> not doing the static analysis:
> 
>> (In reply to comment #0)
>>> When I run "clang --analyze" on my c++ source files individually I get reports,
>>> but none when using the scan-build tool.
>> 
>> This is intended behavior.  C++ support is still alpha and so it isn't enabled
>> by default in scan-build.  It's really only intended to be used by those
>> currently hacking on the analyzer.
>> 
>> If you want to enable C++ analysis, you must define the environment variable
>> CCC_ANALYZER_CPLUSPLUS.
>> 
>> It works with 'clang --analyze' because that's not intended to be a public way
>> to use the analyzer.  It should probably be disabled there as well.  In the
>> future that flag may go away as the analyzer evolves to do cross-file analysis.
> 
> I tried setting CCC_ANALYZER_CPLUSPLUS but still no go.
> 
> If one wants try the static analysis on a set of project c++ source
> files, what is the correct way to do it?
> 
> Thanks,
> 
> -Tom

Hi Tom,

Where did you define the environment variable?  Also, does 'c++-analyzer' exist?  We can take this off the list; can you email me the output you are seeing from scan-build?

Ted



More information about the cfe-dev mailing list