summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/static-analyzer.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-05-15 14:27:36 +0000
committerAlexander Kornienko <alexfh@google.com>2014-05-15 14:27:36 +0000
commit23fe95904c092d49e8a5ab6064787bdf52a9b517 (patch)
treee98d16985132e1fe593bcb855f22dc74b6f2ef86 /clang-tools-extra/test/clang-tidy/static-analyzer.cpp
parentc0be7604cf286dd199ecfb1b190f2cf586243631 (diff)
downloadbcm5719-llvm-23fe95904c092d49e8a5ab6064787bdf52a9b517.tar.gz
bcm5719-llvm-23fe95904c092d49e8a5ab6064787bdf52a9b517.zip
Change the behavior of clang-tidy -checks=, remove -disable-checks.
Summary: Make checks filtering more intuitive and easy to use. Remove -disable-checks and change the format of -checks= to a comma-separated list of globs with optional '-' prefix to denote exclusion. The -checks= option is now cumulative, so it modifies defaults, not overrides them. Each glob adds or removes to the current set of checks, so the filter can be refined or overriden by adding globs. Example: The default value for -checks= is '*,-clang-analyzer-alpha*,-llvm-include-order,-llvm-namespace-comment,-google-*', which allows all checks except for the ones named clang-analyzer-alpha* and others specified with the leading '-'. To allow all google-* checks one can write: clang-tidy -checks=google-* ... If one needs only google-* checks, we first need to remove everything (-*): clang-tidy -checks=-*,google-* etc. I'm not sure if we need to change something here, so I didn't touch the docs yet. Reviewers: klimek, alexfh Reviewed By: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3770 llvm-svn: 208883
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/static-analyzer.cpp')
-rw-r--r--clang-tools-extra/test/clang-tidy/static-analyzer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-tools-extra/test/clang-tidy/static-analyzer.cpp b/clang-tools-extra/test/clang-tidy/static-analyzer.cpp
index 230d851b0b5..08bd4b291da 100644
--- a/clang-tools-extra/test/clang-tidy/static-analyzer.cpp
+++ b/clang-tools-extra/test/clang-tidy/static-analyzer.cpp
@@ -1,4 +1,4 @@
-// RUN: clang-tidy %s -checks='clang-analyzer-.*' -disable-checks='alpha' -- | FileCheck %s
+// RUN: clang-tidy %s -checks='-*,clang-analyzer-*,-clang-analyzer-alpha*' -- | FileCheck %s
extern void *malloc(unsigned long);
extern void free(void *);
OpenPOWER on IntegriCloud