[cfe-dev] Clang Static Analyzer: how to use it for C++ application?

Ted Kremenek kremenek at apple.com
Tue Apr 26 15:21:48 PDT 2011


If you run scan-build without an options, it will give you a summary of possible command line options.  The most relevant for your question are:

> CONTROLLING CHECKERS:
> 
>  A default group of checkers are always run unless explicitly disabled.
>  Checkers may be enabled/disabled using the following options:
> 
>  -enable-checker [checker name]
>  -disable-checker [checker name]
> 


None of the "experimental" checkers are *listed* under AVAILABLE CHECKERS, but you can still enable them.

On Apr 26, 2011, at 3:18 PM, Liang Qi wrote:

> Hi, Ted,
> 
> Thanks a lot. I got this output for my dummy project,
> http://pastebin.com/egyx90t3
> 
> Yes, I also set this env:
> export CCC_CXX="clang++"
> 
> And could you do me a favor once more? How could I enable the checker
> for "cplusplus.experimental.Iterators" in this scan-build/cmake
> context?
> 
> Best Regards,
> Liang
> 
> On 26 April 2011 23:03, Ted Kremenek <kremenek at apple.com> wrote:
>> Example of running it on the LLVM codebase:
>> 
>> $ mkdir llvm-cmake
>> $ cd llvm-cmake
>> $ scan-build cmake -G "Unix Makefiles" ~/llvm
>> ...
>> $ scan-build make
> 
> -- 
> http://www.qiliang.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110426/06ace7fd/attachment.html>


More information about the cfe-dev mailing list