From 1896a31dd33147d6bd798b5b209ec74e50b27783 Mon Sep 17 00:00:00 2001 From: Yitzhak Mandelbaum Date: Tue, 13 Aug 2019 14:48:13 +0000 Subject: [PATCH] [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 --- .../clang-tidy/utils/TransformerClangTidyCheck.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp b/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp index 4ff976de14be..2758b18f108d 100644 --- a/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp +++ b/clang-tools-extra/clang-tidy/utils/TransformerClangTidyCheck.cpp @@ -62,7 +62,8 @@ void TransformerClangTidyCheck::registerPPCallbacks( void TransformerClangTidyCheck::registerMatchers( ast_matchers::MatchFinder *Finder) { if (Rule) - Finder->addDynamicMatcher(tooling::detail::buildMatcher(*Rule), this); + for (auto &Matcher : tooling::detail::buildMatchers(*Rule)) + Finder->addDynamicMatcher(Matcher, this); } void TransformerClangTidyCheck::check(