aboutsummaryrefslogtreecommitdiff
path: root/clang-tidy/hicpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2018-02-18 19:02:35 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2018-02-18 19:02:35 +0000
commit38d22d28f5dfa72c65f9dd494e23d26d4cc08951 (patch)
tree0ca8bf84adb1326ba9aeada934b8915659e297a5 /clang-tidy/hicpp
parentc2a4d693ab80b41ee7056be38043beb3c24f3978 (diff)
[tidy] Move private ast matchers into anonymous namespaces to avoid ODR conflicts.
No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@325467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'clang-tidy/hicpp')
-rw-r--r--clang-tidy/hicpp/NoAssemblerCheck.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/clang-tidy/hicpp/NoAssemblerCheck.cpp b/clang-tidy/hicpp/NoAssemblerCheck.cpp
index 053db613..06969a87 100644
--- a/clang-tidy/hicpp/NoAssemblerCheck.cpp
+++ b/clang-tidy/hicpp/NoAssemblerCheck.cpp
@@ -14,17 +14,16 @@
using namespace clang::ast_matchers;
namespace clang {
-namespace ast_matchers {
-AST_MATCHER(VarDecl, isAsm) { return Node.hasAttr<clang::AsmLabelAttr>(); }
-const internal::VariadicDynCastAllOfMatcher<Decl, FileScopeAsmDecl>
- fileScopeAsmDecl;
-}
-}
-
-namespace clang {
namespace tidy {
namespace hicpp {
+namespace {
+AST_MATCHER(VarDecl, isAsm) { return Node.hasAttr<clang::AsmLabelAttr>(); }
+const ast_matchers::internal::VariadicDynCastAllOfMatcher<Decl,
+ FileScopeAsmDecl>
+ fileScopeAsmDecl;
+} // namespace
+
void NoAssemblerCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(asmStmt().bind("asm-stmt"), this);
Finder->addMatcher(fileScopeAsmDecl().bind("asm-file-scope"), this);