[clang] [Clang][Sema] Don't assert on friend declarators with an empty name (PR #223213)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 16 03:36:56 PDT 2026


================
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -std=c++17 -fsyntax-only -verify %s
+
+template <template <typename> class C> struct S { // expected-note {{template is declared here}}
+    friend C(); //expected-error {{cannot specify deduction guide for template template parameter 'C'}}
----------------
zyn0217 wrote:

Why do we diagnose it as a deduction guide?

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


More information about the cfe-commits mailing list