[clang-tools-extra] r347495 - [clang-tidy] Ignore matches in template instantiations (cert-dcl21-cpp)
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 23 06:30:14 PST 2018
Author: alexfh
Date: Fri Nov 23 06:30:14 2018
New Revision: 347495
URL: http://llvm.org/viewvc/llvm-project?rev=347495&view=rev
Log:
[clang-tidy] Ignore matches in template instantiations (cert-dcl21-cpp)
The test fails with a local modification to
clang-tidy/ClangTidyDiagnosticConsumer.cpp to include fixes into the key when
deduplicating the warnings.
Modified:
clang-tools-extra/trunk/clang-tidy/cert/PostfixOperatorCheck.cpp
Modified: clang-tools-extra/trunk/clang-tidy/cert/PostfixOperatorCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cert/PostfixOperatorCheck.cpp?rev=347495&r1=347494&r2=347495&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cert/PostfixOperatorCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cert/PostfixOperatorCheck.cpp Fri Nov 23 06:30:14 2018
@@ -23,7 +23,8 @@ void PostfixOperatorCheck::registerMatch
return;
Finder->addMatcher(functionDecl(anyOf(hasOverloadedOperatorName("++"),
- hasOverloadedOperatorName("--")))
+ hasOverloadedOperatorName("--")),
+ unless(isInstantiated()))
.bind("decl"),
this);
}
More information about the cfe-commits
mailing list