[PATCH] Add a flag to disable all analyzer warnings

Ted Kremenek kremenek at apple.com
Fri Aug 29 13:20:31 PDT 2014


Ok, sounds good to me.

> On Aug 29, 2014, at 12:06 PM, Anna Zaks <ganna at apple.com> wrote:
> 
> 
>> On Aug 29, 2014, at 11:48 AM, Ted Kremenek <kremenek at apple.com <mailto:kremenek at apple.com>> wrote:
>> 
>> This looks fine to me, although the list might want a bit more motivation.  The idea here is to compose this with "--analyze" so that users can selectively opt out specific files from static analysis.
> Will add to commit message.
>> 
>> There looks like some unintended changes in the patch:
>> 
>> -  getInliningModeForFunction(const Decl *D, const SetOfConstDecls &Visited);
>> +    getInliningModeForFunction(const Decl *D, const SetOfConstDecls &Visited);
>>  
>> Looks like an unintended indentation change unrelated to this patch.
>> 
> 
> The indentation was wrong in the file I was editing, so I've decided to correct. It's unrelated code, but the same file..
> 
>> Also:
>> 
>> +  // Don't analyze if the user explicitely asked for no checks to be performed
>> +  // on this file.
>> 
>> explicitely -> explicitly
>> 
> 
> Thanks.
> 
>> Can you also add to the test case showing that the option works when the -analyzer-checker and -analyzer-disable-all-checkers are inverted?
>> 
>> For example, take this RUN line:
>> 
>> +// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-disable-all-checks -verify %s
>> 
>> and also add:
>> 
>> +// RUN: %clang_cc1 -analyze -analyzer-disable-all-checks -analyzer-checker=core -analyzer-store=region -verify %s
>>   
>> just to show the two behave the same.
> 
> Will do.
> 
>> 
>>> On Aug 29, 2014, at 11:38 AM, Anna Zaks <ganna at apple.com <mailto:ganna at apple.com>> wrote:
>>> 
>>> Please, review:
>>> 
>>> Add an option to silence all analyzer warnings.
>>> 
>>> People have been incorrectly using "-analyzer-disable-checker" to 
>>> silence analyzer warnings on a file, when analyzing a project. Add 
>>> the "-analyzer-disable-all-checks" option, which would allow to do 
>>> this and suggest it as part of the error message for 
>>> "-analyzer-disable-checker".
>>> 
>>> <disable-all-checks.diff>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu <mailto:cfe-commits at cs.uiuc.edu>
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits <http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits>
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140829/c16c800f/attachment.html>


More information about the cfe-commits mailing list