[clang] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 14 09:23:58 PST 2024
================
@@ -6316,6 +6310,15 @@ TEST(HasAnyTemplateArgumentLoc, BindsToSpecializationWithDoubleArgument) {
hasTypeLoc(loc(asString("double")))))))))));
}
+TEST(HasAnyTemplateArgumentLoc, BindsToExplicitSpecializationWithIntArgument) {
+ EXPECT_TRUE(
+ matches("template<typename T> class A {}; template<> class A<int> {};",
+ classTemplateSpecializationDecl(
+ hasName("A"), hasAnyTemplateArgument(templateArgument(
+ refersToType(asString("int")))))));
+}
+
+#if 0
----------------
erichkeane wrote:
Still a WIP, or are these from local testing?
https://github.com/llvm/llvm-project/pull/81642
More information about the cfe-commits
mailing list