[cfe-dev] analyzer: invoking a single analyzer from the static analysis tools.

Ted Kremenek kremenek at apple.com
Wed Feb 26 13:10:35 PST 2014


On Feb 25, 2014, at 11:37 AM, Michael Katelman <katelman at gmail.com> wrote:

> Hi Ted,
> 
> Thanks for the help! I actually have a follow-up question, though. This question came up because I was toying around with developing my own simple checker and wanted to test it out. My first inclination was to do this in isolation from the other checkers which is why I attempted the invocation from my original post, but perhaps you're saying that even for a dev situation like this just run the whole platter of checkers? Or, did you just mean for a general usage scenario where someone isn't adding new checkers etc.?
> 
> I just ended up using --analyze because the scan-build command I could figure out was somewhat more verbose, needing --use-analyzer=... etc.; but, I was mostly fumbling around trying to get it to work, so I'm sure I'm missing a bunch of different things.
> 
> Thanks again.
> 
> -Mike

Using —analyze is fine.  I mainly advocate against using the -cc1 driver options directly.  The analyzer basically expects that some of the core.* checkers are guaranteed to be on to do the path-sensitive analysis, but they are factored as separate checkers both for testing and to make the core engine less monolithic.  Using —analyze will give you the appropriate set of default checkers, and then you can enable additional ones using —analyzer-checker=…, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140226/e4137efc/attachment.html>


More information about the cfe-dev mailing list