[PATCH] Add a flag to disable all analyzer warnings

Jordan Rose jordan_rose at apple.com
Fri Aug 29 13:26:02 PDT 2014


On Aug 29, 2014, at 12:06 , Anna Zaks <ganna at apple.com> wrote:

> 
>> On Aug 29, 2014, at 11:48 AM, Ted Kremenek <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.

Oooops, Ted's comments reminded me of one more test: %clang --analyze %s -Xanalyzer -analyzer-disable-all-checks. Just to test everything through the driver, which is what we really care about.

Jordan

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


More information about the cfe-commits mailing list