[clang] [clang-tools-extra] [Clang] support friend declarations with a dependent nested-name-specifier (PR #191268)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 10 21:59:46 PDT 2026


================
@@ -450,11 +445,15 @@ void A<int>::B::e() { (void)c.private_int; }
 template<class T>
 void A<T>::f() { (void)c.private_int; }
 int A<int>::f() { (void)c.private_int; return 0; }
+// expected-error at -1 {{'private_int' is a private member of 'cwg1862::C'}}
+//   expected-note@#cwg1862-C-private_int {{implicitly declared private here}}
 
 // FIXME: both definition of 'D::g' are not friends, so they don't have access to 'private_int'
----------------
zwuis wrote:

We can update the comment.

https://github.com/llvm/llvm-project/pull/191268


More information about the cfe-commits mailing list