Skip to content

Commit de925b6

Browse files
[clang] Make 'fileScopeAsmDecl' matcher public
1 parent 48babe1 commit de925b6

File tree

6 files changed

+327
-289
lines changed

6 files changed

+327
-289
lines changed

clang-tools-extra/clang-tidy/hicpp/NoAssemblerCheck.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,10 @@ using namespace clang::ast_matchers;
1313

1414
namespace clang::tidy::hicpp {
1515

16-
namespace {
17-
AST_MATCHER(VarDecl, isAsm) { return Node.hasAttr<clang::AsmLabelAttr>(); }
18-
const ast_matchers::internal::VariadicDynCastAllOfMatcher<Decl,
19-
FileScopeAsmDecl>
20-
fileScopeAsmDecl; // NOLINT(readability-identifier-*) preserve clang style
21-
} // namespace
22-
2316
void NoAssemblerCheck::registerMatchers(MatchFinder *Finder) {
2417
Finder->addMatcher(asmStmt().bind("asm-stmt"), this);
2518
Finder->addMatcher(fileScopeAsmDecl().bind("asm-file-scope"), this);
26-
Finder->addMatcher(varDecl(isAsm()).bind("asm-var"), this);
19+
Finder->addMatcher(varDecl(hasAttr(attr::AsmLabel)).bind("asm-var"), this);
2720
}
2821

2922
void NoAssemblerCheck::check(const MatchFinder::MatchResult &Result) {

0 commit comments

Comments
 (0)