[cfe-dev] Turning off checkers

Anna Zaks ganna at apple.com
Tue Aug 13 09:26:46 PDT 2013


The analyzer assumes that the checkers from the core package always run, so it is not advisable to turn those off.

Currently, the only way to disable checkers is to list all the ones you are disabling. You should be able to disable the whole packages of checkers, which would make this simpler.

Anna.
On Aug 13, 2013, at 9:02 AM, Orbán György <o.gyorgy at gmail.com> wrote:

> Hi!
> 
> I have a similar problem. I use scan-build and I'm testing a new checker but I got warnings from other checks which I did not explicitly enabled (like warning: Division by zero). 
> 
> I use this command:
> scan-build --use-analyzer /clang33/build/bin/clang -enable-checker cc.NewChecker -o ./CheckerResults make
> 
> Do I have to disable all the default checks? I tried to get the list of the default checkers (scan-build --help-checkers) but the list is empty and I still got the warnings from the other default checkers.
> 

To see the list of all analyzer checkers you can use:
clang -cc1 -analyzer-checker-help

> I'd like to get only the warnings created by the enabled checker. Did I miss something from the command line?
> 
> Thanks!
> George
> 
> 
> On Sat, Jun 22, 2013 at 2:15 AM, Anna Zaks <ganna at apple.com> wrote:
> Todd, 
> 
> What is your complete command line? Are you calling scan-build or clang?
> 
> Anna.
> On Jun 21, 2013, at 11:40 AM, Todd Nowacki <nowacki724 at gmail.com> wrote:
> 
>> Is there any way to turn off specific checkers for the static analyzer?
>> 
>> I tried just adding one checker, e.g. -analyze-checker=core.DivideZero, but 
>> the following set of checkers still seems to be implicitly enabled:
>> 'core'
>> 'unix'
>> 'deadcode'
>> 'security.insecureAPI.UncheckedReturn'
>> 'security.insecureAPI.getpw'
>> 'security.insecureAPI.gets'
>> 'security.insecureAPI.mktemp'
>> 'security.insecureAPI.mkstemp'
>> 'security.insecureAPI.vfork'
>> 
>> Thanks!
>> 
>> Sincerely,
>> Todd Nowacki
>> 
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 
> 
> _______________________________________________
> 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/20130813/f9931c48/attachment.html>


More information about the cfe-dev mailing list