From ad5074df0c1b9dfce7ff7094ca2b7ec7d4b2167f Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Sun, 30 Nov 2014 19:41:41 +0000 Subject: [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 --- clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang-tools-extra/clang-tidy') 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 -- cgit v1.2.3