[clang-tools-extra] e82dd5b - [clang-tidy][NFC] Remove custom isInAnonymousNamespace matchers
Carlos Galvez via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 23 00:55:01 PST 2022
Author: Carlos Galvez
Date: 2022-12-23T08:54:48Z
New Revision: e82dd5b37c7d6ccd67c5118fe7400c6006e67d73
URL: https://github.com/llvm/llvm-project/commit/e82dd5b37c7d6ccd67c5118fe7400c6006e67d73
DIFF: https://github.com/llvm/llvm-project/commit/e82dd5b37c7d6ccd67c5118fe7400c6006e67d73.diff
LOG: [clang-tidy][NFC] Remove custom isInAnonymousNamespace matchers
Since now the same matcher exists in ASTMatchers.
Added:
Modified:
clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.cpp
clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.cpp b/clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.cpp
index 211bd3c73e12e..909bf793a9197 100644
--- a/clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.cpp
@@ -29,10 +29,6 @@ AST_MATCHER(FunctionDecl, isMemberFunction) {
return llvm::isa<CXXMethodDecl>(&Node);
}
AST_MATCHER(VarDecl, isStaticDataMember) { return Node.isStaticDataMember(); }
-
-AST_MATCHER(Decl, isInAnonymousNamespace) {
- return Node.isInAnonymousNamespace();
-}
} // namespace
UseAnonymousNamespaceCheck::UseAnonymousNamespaceCheck(
diff --git a/clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp b/clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp
index b76c1837b8019..ffd1238e421c3 100644
--- a/clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp
@@ -17,10 +17,6 @@ namespace clang {
namespace tidy {
namespace readability {
-AST_MATCHER(NamedDecl, isInAnonymousNamespace) {
- return Node.isInAnonymousNamespace();
-}
-
void StaticDefinitionInAnonymousNamespaceCheck::registerMatchers(
MatchFinder *Finder) {
Finder->addMatcher(
More information about the cfe-commits
mailing list