================
@@ -2235,6 +2235,21 @@ TEST_P(ASTMatchersTest, 
ArgumentCountIs_CXXConstructExpr) {
                  Constructor1Arg));
 }
 
+TEST_P(ASTMatchersTest, hasDependentName_DependentScopeDeclRefExpr) {
+  if (!GetParam().isCXX() || GetParam().hasDelayedTemplateParsing()) {
+    // FIXME: Fix this test to work with delayed template parsing.
+    return;
+  }
+
+  EXPECT_TRUE(matches("template <class T> class X : T { void f() { T::v; } };",
+                      dependentScopeDeclRefExpr(hasDependentName("v"))));
+
+  EXPECT_TRUE(
----------------
HighCommander4 wrote:

It would be nice to have a test case where the dependent name refers to a 
function (specifically a static member function, since I think that will get a 
`DependentScopeDeclRefExpr` rather than a `CXXDepdendentScopeMemberExpr`).

Come to think of it, this applies for the test for `dependentScopeDeclRefExpr` 
itself.

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

Reply via email to