[cfe-dev] unclear about how to correctly run scan-build through make

Jordan Rose jordan_rose at apple.com
Wed Dec 12 11:22:57 PST 2012


On Dec 12, 2012, at 11:22 , Jordan Rose <jordan_rose at apple.com> wrote:

> It's there on the analyzer site, under "Command Line Usage":
> 
> 
>> scan-build has little or no knowledge about how you build your code. It works by overriding the CC and CXX environment variables to (hopefully) change your build to use a "fake" compiler instead of the one that would normally build your project. This fake compiler executes either clang or gcc (depending on the platform) to compile your code and then executes the static analyzer to analyze your code.
> 
> 
> 
>> The reason configure also needs to be run through scan-build is because scan-build scans your source files by interposing on the compiler. This interposition is currently done by scan-build temporarily setting the environment variable CC to ccc-analyzer. The programccc-analyzer acts like a fake compiler, forwarding its command line arguments over to the compiler to perform regular compilation andclang to perform static analysis.
> 
> 
> I guess we should throw a link to that page into the downloadable "checker" package, and possibly into scan-build itself.

Oh right, we do have a man page. Yes, we should update that.

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


More information about the cfe-dev mailing list