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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Tom Browder
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

Thomas M. Browder, Jr.
Niceville, Florida
USA
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

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

Ted Kremenek
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
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev