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
2014-05-15 22:27:36 +08:00
|
|
|
// RUN: clang-tidy -checks='-*,google-explicit-constructor' %s -- | FileCheck %s
|
2014-03-10 21:11:17 +08:00
|
|
|
|
|
|
|
#define Q(name) class name { name(int i); }
|
|
|
|
|
|
|
|
Q(A);
|
2015-11-28 10:25:02 +08:00
|
|
|
// CHECK: :[[@LINE-1]]:3: warning: single-argument constructors must be marked explicit
|
2014-03-10 21:11:17 +08:00
|
|
|
// CHECK: :3:30: note: expanded from macro 'Q'
|