================
@@ -6,6 +6,89 @@
 // RUN: %clang_cc1 -std=c++23 -pedantic-errors 
-verify=expected,since-cxx11,cxx11-23,since-cxx20,since-cxx23 %s
 // RUN: %clang_cc1 -std=c++2c -pedantic-errors 
-verify=expected,since-cxx11,since-cxx20,since-cxx23,since-cxx26 %s
 
+namespace cwg2803 { // cwg2803: 21
+
+int a[1], *p, *ap[1];
+
+void f1(void*);
+int f1(const volatile int* const&);
+int i1 = f1((int*)0);
+
+void f2(const volatile void* const&);
+int f2(void*);
+int i2 = f2((int*)0);
+
+void f3(const volatile int*);
+int f3(const int*);
+int i3 = f3((int*)0);
+
+void f4(const volatile int* const&);
+int f4(const int* const volatile&);
+int i4 = f4(p);
+
+void f5(const int* const volatile&);
+int f5(const int* const&);
+int i5 = f5(p);
+
+void f6(const volatile int* const (&)[1]);
+int f6(const int* const volatile (&)[1]);
+int i6 = f6(ap);
+
+void f7(const int* const volatile (&)[1]);
+int f7(const int* const (&)[1]);
+int i7 = f7(ap);
+
+int f8(const int* const (&)[]);
+int f8(const volatile int* const (&)[1]);
+int i8 = f8(ap);
+// since-cxx20-error@-1 {{call to 'f8' is ambiguous}}
+//   since-cxx20-note@-4 {{candidate function}}
+//   since-cxx20-note@-4 {{candidate function}}
+
+void f9(const volatile int* const (&)[]);
+int f9(const int* const volatile (&)[1]);
+int i9 = f9(ap);
+
+void f10(int (&)[]);
+int f10(int (&)[1]);
+int i10 = f10(a);
+
+int f11(int (&)[]);
+int f11(const int (&)[1]);
+int i11 = f11(a);
+// since-cxx20-error@-1 {{call to 'f11' is ambiguous}}
+//   since-cxx20-note@-4 {{candidate function}}
+//   since-cxx20-note@-4 {{candidate function}}
+
+int f12(const int (&)[]);
+int f12(volatile int (&)[1]);
+int i12 = f12(a);
+// since-cxx20-error@-1 {{call to 'f12' is ambiguous}}
+//   since-cxx20-note@-4 {{candidate function}}
+//   since-cxx20-note@-4 {{candidate function}}
+
+#if __cplusplus >= 201103L
+void f13(const int* const&&);
+int f13(int* const&);
+int i13 = f13((int*)0);
+
+void f14(const int* const&);
+int f14(const volatile int* const volatile&&);
+int i14 = f14((int*)0);
----------------
Endilll wrote:

It seems that `f13` and `f14` can be tested in C++98 mode.

https://github.com/llvm/llvm-project/pull/132779
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to