aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2019-11-12 15:15:56 +0000
committerStephen Kelly <steveire@gmail.com>2020-05-21 22:34:37 +0100
commita72307c3a6f15badc2efb4614b212e6c5fee1ee9 (patch)
treefb968d2f3b8bccbd0b9e948fe30367957abcf2e5 /clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp
parentd13a50882006f45f760c214d167a7f037a666b0b (diff)
downloadllvm-a72307c3a6f15badc2efb4614b212e6c5fee1ee9.zip
llvm-a72307c3a6f15badc2efb4614b212e6c5fee1ee9.tar.gz
llvm-a72307c3a6f15badc2efb4614b212e6c5fee1ee9.tar.bz2
Set traversal explicitly where needed in clang-tidy
Reviewers: aaron.ballman Subscribers: nemanjai, kbarton, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72530
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp b/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp
index 8dda7a8..dfea010 100644
--- a/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/InefficientAlgorithmCheck.cpp
@@ -35,7 +35,8 @@ void InefficientAlgorithmCheck::registerMatchers(MatchFinder *Finder) {
"::std::unordered_set", "::std::unordered_map",
"::std::unordered_multiset", "::std::unordered_multimap"));
- const auto Matcher =
+ const auto Matcher = traverse(
+ ast_type_traits::TK_AsIs,
callExpr(
callee(functionDecl(Algorithms)),
hasArgument(
@@ -54,7 +55,7 @@ void InefficientAlgorithmCheck::registerMatchers(MatchFinder *Finder) {
hasDeclaration(equalsBoundNode("IneffContObj"))))))))),
hasArgument(2, expr().bind("AlgParam")),
unless(isInTemplateInstantiation()))
- .bind("IneffAlg");
+ .bind("IneffAlg"));
Finder->addMatcher(Matcher, this);
}