Skip to content

Commit 1896a31

Browse files
committed
[clang-tidy] Update TransformerClangTidyCheck to use new buildMatchers functionality.
Summary: `buildMatchers` is the new, more general way to extract the matcher from a rule. This change migrates the code to use it instead of `buildMatcher`. Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65879 llvm-svn: 368700
1 parent 07e6613 commit 1896a31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ void TransformerClangTidyCheck::registerPPCallbacks(
6262
void TransformerClangTidyCheck::registerMatchers(
6363
ast_matchers::MatchFinder *Finder) {
6464
if (Rule)
65-
Finder->addDynamicMatcher(tooling::detail::buildMatcher(*Rule), this);
65+
for (auto &Matcher : tooling::detail::buildMatchers(*Rule))
66+
Finder->addDynamicMatcher(Matcher, this);
6667
}
6768

6869
void TransformerClangTidyCheck::check(

0 commit comments

Comments
 (0)