diff options
author | Alexander Kornienko <alexfh@google.com> | 2014-11-30 19:41:41 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2014-11-30 19:41:41 +0000 |
commit | ad5074df0c1b9dfce7ff7094ca2b7ec7d4b2167f (patch) | |
tree | 65859833e14ff364dc49494c396ef7c3cab39faf /clang-tools-extra/clang-tidy | |
parent | 7432a64dcb0abf5282cb82420b0dd47db28facde (diff) | |
download | bcm5719-llvm-ad5074df0c1b9dfce7ff7094ca2b7ec7d4b2167f.tar.gz bcm5719-llvm-ad5074df0c1b9dfce7ff7094ca2b7ec7d4b2167f.zip |
[clang-tidy] google-explicit-constructor: don't match in template instantiations
This helps avoiding false positives related to the recently added
std::initializer_list<> handling.
llvm-svn: 222981
Diffstat (limited to 'clang-tools-extra/clang-tidy')
-rw-r--r-- | clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp b/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp index a07902e5293..3960dac6842 100644 --- a/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp +++ b/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp @@ -19,7 +19,8 @@ namespace clang { namespace tidy { void ExplicitConstructorCheck::registerMatchers(MatchFinder *Finder) { - Finder->addMatcher(constructorDecl().bind("ctor"), this); + Finder->addMatcher(constructorDecl(unless(isInstantiated())).bind("ctor"), + this); } // Looks for the token matching the predicate and returns the range of the found |