[clang] [Clang][Sema] Diagnose friend function specialization definitions (PR #72863)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 07:00:27 PST 2023


================
@@ -373,6 +373,7 @@ template <class T> void foo() {} // expected-note{{candidate ignored: not a memb
 }
 using ns::foo;
 template <class T> struct A {
+  // expected-error at +1{{friend function specialization cannot be defined}}
----------------
erichkeane wrote:

These already error, and doing a double-error here is not the right way to go.  In this case, it seems to make sense that the 2nd error doesn't happen, same with the next one.

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


More information about the cfe-commits mailing list