From 77d200a546136c2855063613ff4bca1f682fb23a Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Fri, 24 Sep 2021 10:19:06 -0700 Subject: [PATCH] Add test for DR1307, which we have already implemented. Also regenerated cxx_dr_status.html --- clang/test/CXX/drs/dr13xx.cpp | 14 +++++++++++++- clang/www/cxx_dr_status.html | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/clang/test/CXX/drs/dr13xx.cpp b/clang/test/CXX/drs/dr13xx.cpp index 2373a39..cf7091a 100644 --- a/clang/test/CXX/drs/dr13xx.cpp +++ b/clang/test/CXX/drs/dr13xx.cpp @@ -324,7 +324,7 @@ namespace dr1388 { // dr1388: 4 template void g(T..., int); // expected-note 1+{{candidate}} expected-error 0-1{{C++11}} template void h(T..., A); // expected-note 1+{{candidate}} expected-error 0-1{{C++11}} - void test_f() { + void test_f() { f(0); // ok, trailing parameter pack deduced to empty f(0, 0); // expected-error {{no matching}} f(0); @@ -448,3 +448,15 @@ namespace dr1399 { // dr1399: dup 1388 f(0, 0, 0); // expected-error {{no match}} } } + +namespace dr1307 { // dr1307: 14 +#if __cplusplus >= 201103L +void f(int const (&)[2]); +void f(int const (&)[3]); + +void caller() { + // This should not be ambiguous, the 2nd overload is better. + f({1, 2, 3}); +} +#endif // __cplusplus >= 201103L +} // namespace dr1307 diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index 510c0d5..462b335 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -7656,7 +7656,7 @@ and POD class 1307 C++14 Overload resolution based on size of array initializer-list - Unknown + Clang 14 1308 -- 2.7.4