[clang] [Clang][Sema] Implement approved resolution for CWG2858 (PR #88042)

Krystian Stasiowski via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 9 07:56:26 PDT 2024


================
@@ -58,3 +58,24 @@ void B<int>::g() requires true;
 #endif
 
 } // namespace dr2847
+
+namespace dr2858 { // dr2858: 19
+
+#if __cplusplus > 202302L
+
+template<typename... Ts>
+struct A {
+  // FIXME: The nested-name-specifier in the following friend declarations are declarative,
+  // but we don't treat them as such (yet).
+  friend void Ts...[0]::f();
+  template<typename U>
+  friend void Ts...[0]::g();
+
+  friend struct Ts...[0]::B;
+  template<typename U>
+  friend struct Ts...[0]::C; // expected-warning{{is not supported; ignoring this friend declaration}}
----------------
sdkrystian wrote:

@Endilll The index of the _pack-index-specifier_ is currently printed as a memory address (as opposed to `0`). I'll be opening another patch to fix that, but that is why some of the diagnostic message is omitted.

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


More information about the cfe-commits mailing list