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

Michael Katelman katelman at gmail.com
Wed Feb 26 13:21:18 PST 2014


I see. That's extremely helpful and clarifies some things for me. I wasn't
sure at first whether or not -analyzer-checker was effective with --analyze
because I could see those core checkers running. That the analyzer relies
on those checkers makes a crash that I ran into now understandable (I
forced divide-by-zero off).


Thanks!

-Mike


On Wed, Feb 26, 2014 at 1:10 PM, Ted Kremenek <kremenek at apple.com> wrote:

> 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/ab8aa2f2/attachment.html>


More information about the cfe-dev mailing list