Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang.
llvm-svn: 247886
diff --git a/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp b/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
index 5dad36f..6fb1ca9 100644
--- a/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
@@ -27,14 +27,15 @@
return;
// Match unary methods that overload operator&.
- Finder->addMatcher(methodDecl(parameterCountIs(0), hasOverloadedOperatorName(
- "&")).bind("overload"),
- this);
+ Finder->addMatcher(
+ cxxMethodDecl(parameterCountIs(0), hasOverloadedOperatorName("&"))
+ .bind("overload"),
+ this);
// Also match freestanding unary operator& overloads. Be careful not to match
// binary methods.
Finder->addMatcher(
functionDecl(
- allOf(unless(methodDecl()),
+ allOf(unless(cxxMethodDecl()),
functionDecl(parameterCountIs(1),
hasOverloadedOperatorName("&")).bind("overload"))),
this);