summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/google
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/google')
-rw-r--r--clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp4
-rw-r--r--clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp9
2 files changed, 7 insertions, 6 deletions
diff --git a/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp b/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp
index 22e2139fbd4..68baf708007 100644
--- a/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp
@@ -23,8 +23,8 @@ void ExplicitConstructorCheck::registerMatchers(MatchFinder *Finder) {
// Only register the matchers for C++; the functionality currently does not
// provide any benefit to other languages, despite being benign.
if (getLangOpts().CPlusPlus)
- Finder->addMatcher(constructorDecl(unless(isInstantiated())).bind("ctor"),
- this);
+ Finder->addMatcher(
+ cxxConstructorDecl(unless(isInstantiated())).bind("ctor"), this);
}
// Looks for the token matching the predicate and returns the range of the found
diff --git a/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp b/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
index 5dad36f60e0..6fb1ca9d662 100644
--- a/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
@@ -27,14 +27,15 @@ OverloadedUnaryAndCheck::registerMatchers(ast_matchers::MatchFinder *Finder) {
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);
OpenPOWER on IntegriCloud