summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-09-03 13:30:28 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-09-03 13:30:28 +0000
commit6bcbe6e04d0ff61e3eec9eb01d3c535fd2f78a38 (patch)
tree09812252794454f36e99d0d56827f2bef1d6bcb2 /clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.cpp
parentb7f59d6bbd6c97b6d35467fcce635fc4884d230b (diff)
downloadbcm5719-llvm-6bcbe6e04d0ff61e3eec9eb01d3c535fd2f78a38.tar.gz
bcm5719-llvm-6bcbe6e04d0ff61e3eec9eb01d3c535fd2f78a38.zip
[clang-tidy] Eliminate inline copies of InTemplateInstantiation matcher.
llvm-svn: 217036
Diffstat (limited to 'clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.cpp b/clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.cpp
index 1331c57142a..d09be299ebc 100644
--- a/clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.cpp
@@ -30,9 +30,7 @@ ExplicitMakePairCheck::registerMatchers(ast_matchers::MatchFinder *Finder) {
// Look for std::make_pair with explicit template args. Ignore calls in
// templates.
Finder->addMatcher(
- callExpr(unless(hasAncestor(decl(anyOf(
- recordDecl(ast_matchers::isTemplateInstantiation()),
- functionDecl(ast_matchers::isTemplateInstantiation()))))),
+ callExpr(unless(isInTemplateInstantiation()),
callee(expr(ignoringParenImpCasts(
declRefExpr(hasExplicitTemplateArgs(),
to(functionDecl(hasName("::std::make_pair"))))
OpenPOWER on IntegriCloud