File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
clang/include/clang/ASTMatchers Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -672,8 +672,19 @@ class Matcher {
672672 DynTypedMatcher Implementation;
673673}; // class Matcher
674674
675+ // Deduction guide for Matcher.
675676template <typename T> Matcher (MatcherInterface<T> *) -> Matcher<T>;
676677
678+ // TODO: Remove in LLVM 23.
679+ template <typename T>
680+ [[deprecated(
681+ " makeMatcher() is deprecated and will be removed in LLVM 23. "
682+ " Uses of it can be replaced with direct calls to Matcher's "
683+ " constructor; with C++17's CTAD, template arguments will be deduced." )]]
684+ inline Matcher<T> makeMatcher (MatcherInterface<T> *Implementation) {
685+ return Matcher<T>(Implementation);
686+ }
687+
677688// / Interface that allows matchers to traverse the AST.
678689// / FIXME: Find a better name.
679690// /
You can’t perform that action at this time.
0 commit comments