[cfe-dev] Using scan-build with custom checker plugins
Thomas Hauth
Thomas.Hauth at cern.ch
Wed May 16 05:49:15 PDT 2012
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
More information about the cfe-dev
mailing list