[clang] [Clang][Sema] Don't assert on friend declarators with an empty name (PR #223213)
Ambrose Leeb via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 17 12:58:20 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'}}
----------------
Sirraide wrote:
I think we're getting very confused because this essentially looks like a friend-qualified constructor declaration (because `C` is a class name here), but I’m not sure where exactly we should best be rejecting this.
https://github.com/llvm/llvm-project/pull/223213
More information about the cfe-commits
mailing list