[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Mon May 27 02:05:17 PDT 2024


================
@@ -240,3 +240,29 @@ void test() {
 }
 }
 #endif
+
+
+#if __cplusplus >= 202302L
+namespace cwg2692 { // cwg2692: 19
+
+ struct A {
+    static void f(A); // #cwg2692-1
+    void f(this A); // #cwg2692-2
+
+    void g();
+  };
+
+  void A::g() {
+    (&A::f)(A()); // expected-error {{call to 'f' is ambiguous}}
----------------
Endilll wrote:

Follow `// expected-error at -1` style, like the rest of DR tests.

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


More information about the cfe-commits mailing list