Skip to content

Commit 3bccf78

Browse files
committed
Deprecate instead of removing
1 parent c9da8d9 commit 3bccf78

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

clang/include/clang/ASTMatchers/ASTMatchersInternal.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,8 +672,19 @@ class Matcher {
672672
DynTypedMatcher Implementation;
673673
}; // class Matcher
674674

675+
// Deduction guide for Matcher.
675676
template <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
///

0 commit comments

Comments
 (0)