[clang] 77d200a - Add test for DR1307, which we have already implemented.
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 24 10:24:37 PDT 2021
Author: Erich Keane
Date: 2021-09-24T10:24:32-07:00
New Revision: 77d200a546136c2855063613ff4bca1f682fb23a
URL: https://github.com/llvm/llvm-project/commit/77d200a546136c2855063613ff4bca1f682fb23a
DIFF: https://github.com/llvm/llvm-project/commit/77d200a546136c2855063613ff4bca1f682fb23a.diff
LOG: Add test for DR1307, which we have already implemented.
Also regenerated cxx_dr_status.html
Added:
Modified:
clang/test/CXX/drs/dr13xx.cpp
clang/www/cxx_dr_status.html
Removed:
################################################################################
diff --git a/clang/test/CXX/drs/dr13xx.cpp b/clang/test/CXX/drs/dr13xx.cpp
index 2373a3967ddc..cf7091a533b5 100644
--- a/clang/test/CXX/drs/dr13xx.cpp
+++ b/clang/test/CXX/drs/dr13xx.cpp
@@ -324,7 +324,7 @@ namespace dr1388 { // dr1388: 4
template<typename ...T> void g(T..., int); // expected-note 1+{{candidate}} expected-error 0-1{{C++11}}
template<typename ...T, typename A> 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<int>(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 510c0d59203d..462b335f7801 100755
--- a/clang/www/cxx_dr_status.html
+++ b/clang/www/cxx_dr_status.html
@@ -7656,7 +7656,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
<td><a href="https://wg21.link/cwg1307">1307</a></td>
<td>C++14</td>
<td>Overload resolution based on size of array <I>initializer-list</I></td>
- <td class="none" align="center">Unknown</td>
+ <td class="unreleased" align="center">Clang 14</td>
</tr>
<tr id="1308">
<td><a href="https://wg21.link/cwg1308">1308</a></td>
More information about the cfe-commits
mailing list