[PATCH] Add a flag to disable all analyzer warnings
Ted Kremenek
kremenek at apple.com
Fri Aug 29 11:48:37 PDT 2014
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.
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.
Also:
+ // Don't analyze if the user explicitely asked for no checks to be performed
+ // on this file.
explicitely -> explicitly
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.
> On Aug 29, 2014, at 11:38 AM, Anna Zaks <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
> 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/d9722850/attachment.html>
More information about the cfe-commits
mailing list