[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-01 Thread kefan cao via cfe-commits

https://github.com/caokefan created 
https://github.com/llvm/llvm-project/pull/121435

Add AST Matcher for `dependentTemplateSpecializationType`
Fixes:https://github.com/llvm/llvm-project/issues/121307

>From a70a9e55f99accc659b23d1a76888e151bdd8f73 Mon Sep 17 00:00:00 2001
From: Kefan Cao <45958009+caoke...@users.noreply.github.com>
Date: Tue, 31 Dec 2024 09:17:18 +
Subject: [PATCH] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType`
 AST matcher

---
 clang/docs/LibASTMatchersReference.html   | 11 +++
 clang/docs/ReleaseNotes.rst   |  2 ++
 clang/include/clang/ASTMatchers/ASTMatchers.h | 12 
 clang/lib/ASTMatchers/ASTMatchersInternal.cpp |  2 ++
 clang/lib/ASTMatchers/Dynamic/Registry.cpp|  1 +
 clang/unittests/AST/ASTImporterTest.cpp   |  4 
 .../unittests/ASTMatchers/ASTMatchersNodeTest.cpp | 15 +++
 7 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/clang/docs/LibASTMatchersReference.html 
b/clang/docs/LibASTMatchersReference.html
index 8564f2650d205f..428a3385e2f39e 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -2546,6 +2546,17 @@ Node Matchers
   };
 
 
+MatcherType>dependentTemplateSpecializationTypeMatcherDependentTemplateSpecializationType>...
+Matches dependent template 
specialization types.
+
+Example matches  A::template B
+
+  template struct A;
+  template struct declToImport {
+typename A::template B a;
+  };
+
+
 MatcherType>deducedTemplateSpecializationTypeMatcherDeducedTemplateSpecializationType>...
 Matches C++17 deduced template 
specialization types, e.g. deduced class
 template types.
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 2a688a677294f8..e17d22d1e1cdcf 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1113,6 +1113,8 @@ AST Matchers
 
 - Add ``dependentNameType`` matcher to match a dependent name type.
 
+- Add ``dependentTemplateSpecializationType`` matcher to match dependent 
template specialization types.
+
 clang-format
 
 
diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h 
b/clang/include/clang/ASTMatchers/ASTMatchers.h
index 9a046714068a51..1b678f30c5d01c 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchers.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -7721,6 +7721,18 @@ AST_MATCHER_P(DecayedType, hasDecayedType, 
internal::Matcher,
 /// \endcode
 extern const AstTypeMatcher dependentNameType;
 
+/// Matches dependent template specialization types
+///
+/// Example matches  A::template B
+/// \code
+///   template struct A;
+///   template struct declToImport {
+/// typename A::template B a;
+///   };
+/// \endcode
+extern const AstTypeMatcher
+dependentTemplateSpecializationType;
+
 /// Matches declarations whose declaration context, interpreted as a
 /// Decl, matches \c InnerMatcher.
 ///
diff --git a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp 
b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
index a47633bf4bae24..9c7943a98d6523 100644
--- a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
+++ b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
@@ -1109,6 +1109,8 @@ const AstTypeMatcher 
templateTypeParmType;
 const AstTypeMatcher injectedClassNameType;
 const AstTypeMatcher decayedType;
 const AstTypeMatcher dependentNameType;
+const AstTypeMatcher
+dependentTemplateSpecializationType;
 AST_TYPELOC_TRAVERSE_MATCHER_DEF(hasElementType,
  AST_POLYMORPHIC_SUPPORTED_TYPES(ArrayType,
  ComplexType));
diff --git a/clang/lib/ASTMatchers/Dynamic/Registry.cpp 
b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
index bfdee412c53281..97e6bbc093fe46 100644
--- a/clang/lib/ASTMatchers/Dynamic/Registry.cpp
+++ b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
@@ -224,6 +224,7 @@ RegistryMaps::RegistryMaps() {
   REGISTER_MATCHER(declRefExpr);
   REGISTER_MATCHER(dependentNameType);
   REGISTER_MATCHER(dependentScopeDeclRefExpr);
+  REGISTER_MATCHER(dependentTemplateSpecializationType);
   REGISTER_MATCHER(declStmt);
   REGISTER_MATCHER(declaratorDecl);
   REGISTER_MATCHER(decltypeType);
diff --git a/clang/unittests/AST/ASTImporterTest.cpp 
b/clang/unittests/AST/ASTImporterTest.cpp
index ee1d896f1ca6dc..d197d30df3adf5 100644
--- a/clang/unittests/AST/ASTImporterTest.cpp
+++ b/clang/unittests/AST/ASTImporterTest.cpp
@@ -763,10 +763,6 @@ TEST_P(ImportType, ImportPackExpansion) {
implicitCastExpr(has(declRefExpr();
 }
 
-const internal::VariadicDynCastAllOfMatcher
-dependentTemplateSpecializa

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-02 Thread kefan cao via cfe-commits

https://github.com/caokefan updated 
https://github.com/llvm/llvm-project/pull/121435

>From 698464e3a2d30c15f7055449faa6ad58d0db6ac7 Mon Sep 17 00:00:00 2001
From: Kefan Cao <45958009+caoke...@users.noreply.github.com>
Date: Tue, 31 Dec 2024 09:17:18 +
Subject: [PATCH] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType`
 AST matcher

---
 clang/docs/LibASTMatchersReference.html   | 11 +++
 clang/docs/ReleaseNotes.rst   |  2 ++
 clang/include/clang/ASTMatchers/ASTMatchers.h | 12 
 clang/lib/ASTMatchers/ASTMatchersInternal.cpp |  2 ++
 clang/lib/ASTMatchers/Dynamic/Registry.cpp|  1 +
 clang/unittests/AST/ASTImporterTest.cpp   |  4 
 .../unittests/ASTMatchers/ASTMatchersNodeTest.cpp | 15 +++
 7 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/clang/docs/LibASTMatchersReference.html 
b/clang/docs/LibASTMatchersReference.html
index 8564f2650d205f..fc557888013254 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -2546,6 +2546,17 @@ Node Matchers
   };
 
 
+MatcherType>dependentTemplateSpecializationTypeMatcherDependentTemplateSpecializationType>...
+Matches a dependent template 
specialization type.
+
+Example matches A::template B
+
+  template struct A;
+  template struct declToImport {
+typename A::template B a;
+  };
+
+
 MatcherType>deducedTemplateSpecializationTypeMatcherDeducedTemplateSpecializationType>...
 Matches C++17 deduced template 
specialization types, e.g. deduced class
 template types.
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index e0aef1af2135cd..9d0f7166f1c5ac 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1113,6 +1113,8 @@ AST Matchers
 
 - Add ``dependentNameType`` matcher to match a dependent name type.
 
+- Add ``dependentTemplateSpecializationType`` matcher to match a dependent 
template specialization type.
+
 clang-format
 
 
diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h 
b/clang/include/clang/ASTMatchers/ASTMatchers.h
index 9a046714068a51..dd0fedb2cda2d4 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchers.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -7721,6 +7721,18 @@ AST_MATCHER_P(DecayedType, hasDecayedType, 
internal::Matcher,
 /// \endcode
 extern const AstTypeMatcher dependentNameType;
 
+/// Matches a dependent template specialization type
+///
+/// Example matches A::template B
+/// \code
+///   template struct A;
+///   template struct declToImport {
+/// typename A::template B a;
+///   };
+/// \endcode
+extern const AstTypeMatcher
+dependentTemplateSpecializationType;
+
 /// Matches declarations whose declaration context, interpreted as a
 /// Decl, matches \c InnerMatcher.
 ///
diff --git a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp 
b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
index a47633bf4bae24..9c7943a98d6523 100644
--- a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
+++ b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
@@ -1109,6 +1109,8 @@ const AstTypeMatcher 
templateTypeParmType;
 const AstTypeMatcher injectedClassNameType;
 const AstTypeMatcher decayedType;
 const AstTypeMatcher dependentNameType;
+const AstTypeMatcher
+dependentTemplateSpecializationType;
 AST_TYPELOC_TRAVERSE_MATCHER_DEF(hasElementType,
  AST_POLYMORPHIC_SUPPORTED_TYPES(ArrayType,
  ComplexType));
diff --git a/clang/lib/ASTMatchers/Dynamic/Registry.cpp 
b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
index bfdee412c53281..97e6bbc093fe46 100644
--- a/clang/lib/ASTMatchers/Dynamic/Registry.cpp
+++ b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
@@ -224,6 +224,7 @@ RegistryMaps::RegistryMaps() {
   REGISTER_MATCHER(declRefExpr);
   REGISTER_MATCHER(dependentNameType);
   REGISTER_MATCHER(dependentScopeDeclRefExpr);
+  REGISTER_MATCHER(dependentTemplateSpecializationType);
   REGISTER_MATCHER(declStmt);
   REGISTER_MATCHER(declaratorDecl);
   REGISTER_MATCHER(decltypeType);
diff --git a/clang/unittests/AST/ASTImporterTest.cpp 
b/clang/unittests/AST/ASTImporterTest.cpp
index ee1d896f1ca6dc..d197d30df3adf5 100644
--- a/clang/unittests/AST/ASTImporterTest.cpp
+++ b/clang/unittests/AST/ASTImporterTest.cpp
@@ -763,10 +763,6 @@ TEST_P(ImportType, ImportPackExpansion) {
implicitCastExpr(has(declRefExpr();
 }
 
-const internal::VariadicDynCastAllOfMatcher
-dependentTemplateSpecializationType;
-
 TEST_P(ImportType, ImportDependentTemplateSpecialization) {
   MatchVerifier Verifier;
   testImport("

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-02 Thread kefan cao via cfe-commits


@@ -1113,6 +1113,8 @@ AST Matchers
 
 - Add ``dependentNameType`` matcher to match a dependent name type.
 
+- Add ``dependentTemplateSpecializationType`` matcher to match dependent 
template specialization types.

caokefan wrote:

Got it! Thank you for your correction!

https://github.com/llvm/llvm-project/pull/121435
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-02 Thread kefan cao via cfe-commits

https://github.com/caokefan updated 
https://github.com/llvm/llvm-project/pull/121435

>From 698464e3a2d30c15f7055449faa6ad58d0db6ac7 Mon Sep 17 00:00:00 2001
From: Kefan Cao <45958009+caoke...@users.noreply.github.com>
Date: Tue, 31 Dec 2024 09:17:18 +
Subject: [PATCH] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType`
 AST matcher

---
 clang/docs/LibASTMatchersReference.html   | 11 +++
 clang/docs/ReleaseNotes.rst   |  2 ++
 clang/include/clang/ASTMatchers/ASTMatchers.h | 12 
 clang/lib/ASTMatchers/ASTMatchersInternal.cpp |  2 ++
 clang/lib/ASTMatchers/Dynamic/Registry.cpp|  1 +
 clang/unittests/AST/ASTImporterTest.cpp   |  4 
 .../unittests/ASTMatchers/ASTMatchersNodeTest.cpp | 15 +++
 7 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/clang/docs/LibASTMatchersReference.html 
b/clang/docs/LibASTMatchersReference.html
index 8564f2650d205f..fc557888013254 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -2546,6 +2546,17 @@ Node Matchers
   };
 
 
+MatcherType>dependentTemplateSpecializationTypeMatcherDependentTemplateSpecializationType>...
+Matches a dependent template 
specialization type.
+
+Example matches A::template B
+
+  template struct A;
+  template struct declToImport {
+typename A::template B a;
+  };
+
+
 MatcherType>deducedTemplateSpecializationTypeMatcherDeducedTemplateSpecializationType>...
 Matches C++17 deduced template 
specialization types, e.g. deduced class
 template types.
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index e0aef1af2135cd..9d0f7166f1c5ac 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1113,6 +1113,8 @@ AST Matchers
 
 - Add ``dependentNameType`` matcher to match a dependent name type.
 
+- Add ``dependentTemplateSpecializationType`` matcher to match a dependent 
template specialization type.
+
 clang-format
 
 
diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h 
b/clang/include/clang/ASTMatchers/ASTMatchers.h
index 9a046714068a51..dd0fedb2cda2d4 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchers.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -7721,6 +7721,18 @@ AST_MATCHER_P(DecayedType, hasDecayedType, 
internal::Matcher,
 /// \endcode
 extern const AstTypeMatcher dependentNameType;
 
+/// Matches a dependent template specialization type
+///
+/// Example matches A::template B
+/// \code
+///   template struct A;
+///   template struct declToImport {
+/// typename A::template B a;
+///   };
+/// \endcode
+extern const AstTypeMatcher
+dependentTemplateSpecializationType;
+
 /// Matches declarations whose declaration context, interpreted as a
 /// Decl, matches \c InnerMatcher.
 ///
diff --git a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp 
b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
index a47633bf4bae24..9c7943a98d6523 100644
--- a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
+++ b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
@@ -1109,6 +1109,8 @@ const AstTypeMatcher 
templateTypeParmType;
 const AstTypeMatcher injectedClassNameType;
 const AstTypeMatcher decayedType;
 const AstTypeMatcher dependentNameType;
+const AstTypeMatcher
+dependentTemplateSpecializationType;
 AST_TYPELOC_TRAVERSE_MATCHER_DEF(hasElementType,
  AST_POLYMORPHIC_SUPPORTED_TYPES(ArrayType,
  ComplexType));
diff --git a/clang/lib/ASTMatchers/Dynamic/Registry.cpp 
b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
index bfdee412c53281..97e6bbc093fe46 100644
--- a/clang/lib/ASTMatchers/Dynamic/Registry.cpp
+++ b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
@@ -224,6 +224,7 @@ RegistryMaps::RegistryMaps() {
   REGISTER_MATCHER(declRefExpr);
   REGISTER_MATCHER(dependentNameType);
   REGISTER_MATCHER(dependentScopeDeclRefExpr);
+  REGISTER_MATCHER(dependentTemplateSpecializationType);
   REGISTER_MATCHER(declStmt);
   REGISTER_MATCHER(declaratorDecl);
   REGISTER_MATCHER(decltypeType);
diff --git a/clang/unittests/AST/ASTImporterTest.cpp 
b/clang/unittests/AST/ASTImporterTest.cpp
index ee1d896f1ca6dc..d197d30df3adf5 100644
--- a/clang/unittests/AST/ASTImporterTest.cpp
+++ b/clang/unittests/AST/ASTImporterTest.cpp
@@ -763,10 +763,6 @@ TEST_P(ImportType, ImportPackExpansion) {
implicitCastExpr(has(declRefExpr();
 }
 
-const internal::VariadicDynCastAllOfMatcher
-dependentTemplateSpecializationType;
-
 TEST_P(ImportType, ImportDependentTemplateSpecialization) {
   MatchVerifier Verifier;
   testImport("

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-02 Thread kefan cao via cfe-commits

https://github.com/caokefan updated 
https://github.com/llvm/llvm-project/pull/121435

>From 698464e3a2d30c15f7055449faa6ad58d0db6ac7 Mon Sep 17 00:00:00 2001
From: Kefan Cao <45958009+caoke...@users.noreply.github.com>
Date: Tue, 31 Dec 2024 09:17:18 +
Subject: [PATCH] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType`
 AST matcher

---
 clang/docs/LibASTMatchersReference.html   | 11 +++
 clang/docs/ReleaseNotes.rst   |  2 ++
 clang/include/clang/ASTMatchers/ASTMatchers.h | 12 
 clang/lib/ASTMatchers/ASTMatchersInternal.cpp |  2 ++
 clang/lib/ASTMatchers/Dynamic/Registry.cpp|  1 +
 clang/unittests/AST/ASTImporterTest.cpp   |  4 
 .../unittests/ASTMatchers/ASTMatchersNodeTest.cpp | 15 +++
 7 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/clang/docs/LibASTMatchersReference.html 
b/clang/docs/LibASTMatchersReference.html
index 8564f2650d205f..fc557888013254 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -2546,6 +2546,17 @@ Node Matchers
   };
 
 
+MatcherType>dependentTemplateSpecializationTypeMatcherDependentTemplateSpecializationType>...
+Matches a dependent template 
specialization type.
+
+Example matches A::template B
+
+  template struct A;
+  template struct declToImport {
+typename A::template B a;
+  };
+
+
 MatcherType>deducedTemplateSpecializationTypeMatcherDeducedTemplateSpecializationType>...
 Matches C++17 deduced template 
specialization types, e.g. deduced class
 template types.
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index e0aef1af2135cd..9d0f7166f1c5ac 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1113,6 +1113,8 @@ AST Matchers
 
 - Add ``dependentNameType`` matcher to match a dependent name type.
 
+- Add ``dependentTemplateSpecializationType`` matcher to match a dependent 
template specialization type.
+
 clang-format
 
 
diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h 
b/clang/include/clang/ASTMatchers/ASTMatchers.h
index 9a046714068a51..dd0fedb2cda2d4 100644
--- a/clang/include/clang/ASTMatchers/ASTMatchers.h
+++ b/clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -7721,6 +7721,18 @@ AST_MATCHER_P(DecayedType, hasDecayedType, 
internal::Matcher,
 /// \endcode
 extern const AstTypeMatcher dependentNameType;
 
+/// Matches a dependent template specialization type
+///
+/// Example matches A::template B
+/// \code
+///   template struct A;
+///   template struct declToImport {
+/// typename A::template B a;
+///   };
+/// \endcode
+extern const AstTypeMatcher
+dependentTemplateSpecializationType;
+
 /// Matches declarations whose declaration context, interpreted as a
 /// Decl, matches \c InnerMatcher.
 ///
diff --git a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp 
b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
index a47633bf4bae24..9c7943a98d6523 100644
--- a/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
+++ b/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
@@ -1109,6 +1109,8 @@ const AstTypeMatcher 
templateTypeParmType;
 const AstTypeMatcher injectedClassNameType;
 const AstTypeMatcher decayedType;
 const AstTypeMatcher dependentNameType;
+const AstTypeMatcher
+dependentTemplateSpecializationType;
 AST_TYPELOC_TRAVERSE_MATCHER_DEF(hasElementType,
  AST_POLYMORPHIC_SUPPORTED_TYPES(ArrayType,
  ComplexType));
diff --git a/clang/lib/ASTMatchers/Dynamic/Registry.cpp 
b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
index bfdee412c53281..97e6bbc093fe46 100644
--- a/clang/lib/ASTMatchers/Dynamic/Registry.cpp
+++ b/clang/lib/ASTMatchers/Dynamic/Registry.cpp
@@ -224,6 +224,7 @@ RegistryMaps::RegistryMaps() {
   REGISTER_MATCHER(declRefExpr);
   REGISTER_MATCHER(dependentNameType);
   REGISTER_MATCHER(dependentScopeDeclRefExpr);
+  REGISTER_MATCHER(dependentTemplateSpecializationType);
   REGISTER_MATCHER(declStmt);
   REGISTER_MATCHER(declaratorDecl);
   REGISTER_MATCHER(decltypeType);
diff --git a/clang/unittests/AST/ASTImporterTest.cpp 
b/clang/unittests/AST/ASTImporterTest.cpp
index ee1d896f1ca6dc..d197d30df3adf5 100644
--- a/clang/unittests/AST/ASTImporterTest.cpp
+++ b/clang/unittests/AST/ASTImporterTest.cpp
@@ -763,10 +763,6 @@ TEST_P(ImportType, ImportPackExpansion) {
implicitCastExpr(has(declRefExpr();
 }
 
-const internal::VariadicDynCastAllOfMatcher
-dependentTemplateSpecializationType;
-
 TEST_P(ImportType, ImportDependentTemplateSpecialization) {
   MatchVerifier Verifier;
   testImport("

[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-01 Thread kefan cao via cfe-commits

caokefan wrote:

@HighCommander4

https://github.com/llvm/llvm-project/pull/121435
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][ASTMatcher] Add `dependentTemplateSpecializationType` AST mat… (PR #121435)

2025-01-02 Thread kefan cao via cfe-commits


@@ -1926,6 +1926,21 @@ TEST_P(ASTMatchersTest, DependentNameType) {
   dependentNameType()));
 }
 
+TEST_P(ASTMatchersTest, DependentTemplateSpecializationType) {
+  if (!GetParam().isCXX()) {
+return;
+  }
+
+  EXPECT_TRUE(matches(
+  R"(
+  template struct A;

caokefan wrote:

Got it! Thank you for your patience and assistance!

https://github.com/llvm/llvm-project/pull/121435
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits