[cfe-dev] Using scan-build with custom checker plugins

Anna Zaks ganna at apple.com
Wed May 16 10:39:23 PDT 2012


Hi Thomas,

I am not aware of anyone else using scan-build with plugin checkers. I think the best way to implement this would be to add command line options to scan-build to specify the plugins and have scan-build pass those on to c++-analyzer. This is how other flags are supported, for example, see "-enable-checker". Would be great if you submit the patch for this to the open source codebase!

Cheers,
Anna.


On May 16, 2012, at 5:49 AM, Thomas Hauth wrote:

> Hello,
> we implemented some custom clang Static Analyzer checkers for our needs 
> and compiled them as external modules.
> 
> When calling clang directly, one can use "-Xclang" to pass the command 
> to load and run the checkers:
> 
> clang++ -Xclang -load -Xclang ./MainCallChecker.so -Xclang 
> -analyzer-checker=example.MainCallChecker --analyze global_static.cpp
> 
> This variant works fine.
> 
> Is there a way, to still load the custom plugins when using the 
> scan-build tool on regular make files?
> 
> As a workaround, I implemented a new environment variable named 
> "CCC_ANALYZER_PLUGINS" which is read by the c++-analyzer script and used 
> to pass the plugins to load to the clang call.
> 
> 
> Thanks,
> Thomas	
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120516/62cc5f2e/attachment.html>


More information about the cfe-dev mailing list