summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp b/clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp
index 053db61322e..06969a873f4 100644
--- a/clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp
+++ b/clang-tools-extra/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);
OpenPOWER on IntegriCloud