[clang] [ASTMatchers] Extend hasName matcher when matching templates (PR #100349)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 29 06:35:14 PDT 2024
================
@@ -3076,6 +3076,21 @@ inline internal::BindableMatcher<Stmt> sizeOfExpr(
/// \code
/// namespace a { namespace b { class X; } }
/// \endcode
+///
+/// Qualified names in templated classes can be matched explicitly or implicity
+/// by specifying the template type or using `<*>` to match any template.
----------------
AaronBallman wrote:
We should probably be clear that `<*>` is the *only* syntax we support. e.g., we don't let you search based on arity, as in `hasName("Foo<int, *>::Bar")`. Might be worth an example as well, definitely worth some test coverage.
https://github.com/llvm/llvm-project/pull/100349
More information about the cfe-commits
mailing list