================
@@ -0,0 +1,36 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++23 %s
+
+// Friend inline re-declaration, where the parameter type is a SAME class
+struct A;
+
+int foo(A&) { return 1; }
+double compute(A&&) { return 3.14; }
+char process(A&, char) { return 'x'; }
+long action(long, A&) { return 42; }
+
+struct A {
+  friend inline int foo(A&);
+  friend inline double compute(A&&);
+  friend inline char process(A&, char);
+  friend inline long action(long, A&);
+};
+
----------------
Endilll wrote:

I suspect that if you add `int foo(A&);` here, it will inherit `inline` from 
the invalid friend declaration, or will give you some bogus errors. 

https://github.com/llvm/llvm-project/pull/199239
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to