Endill updated this revision to Diff 480848. Endill edited the summary of this revision. Endill added a comment.
Add example from [over.match.best]/4, and mark CWG418 as not available CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139429/new/ https://reviews.llvm.org/D139429 Files: clang/test/CXX/drs/dr4xx.cpp clang/www/cxx_dr_status.html Index: clang/www/cxx_dr_status.html =================================================================== --- clang/www/cxx_dr_status.html +++ clang/www/cxx_dr_status.html @@ -2547,7 +2547,7 @@ <td><a href="https://wg21.link/cwg418">418</a></td> <td>CD6</td> <td>Imperfect wording on error on multiple default arguments on a called function</td> - <td class="none" align="center">Unknown</td> + <td class="none" align="center">No</td> </tr> <tr class="open" id="419"> <td><a href="https://wg21.link/cwg419">419</a></td> Index: clang/test/CXX/drs/dr4xx.cpp =================================================================== --- clang/test/CXX/drs/dr4xx.cpp +++ clang/test/CXX/drs/dr4xx.cpp @@ -315,6 +315,50 @@ } } +namespace dr418 { // dr418: no +namespace example1 { +void f1(int, int = 0); +void f1(int = 0, int); + +void g() { f1(); } +} // namespace example1 + +namespace example2 { +namespace A { +void f2(int); // #dr418-f2-decl +} +namespace B { +using A::f2; +} +namespace A { +void f2(int = 3); +} +void g2() { + using B::f2; + f2(); // expected-error {{no matching function}} + // expected-note@#dr418-f2-decl {{requires 1 argument}} +} +} // namespace example2 + +// example from [over.match.best]/4 +namespace example3 { +namespace A { +extern "C" void f(int = 5); +} +namespace B { +extern "C" void f(int = 5); +} + +using A::f; +using B::f; + +void use() { + f(3); + f(); // FIXME: this should fail +} +} // namespace example3 +} // namespace dr418 + namespace dr420 { // dr420: yes template<typename T> struct ptr { T *operator->() const;
Index: clang/www/cxx_dr_status.html =================================================================== --- clang/www/cxx_dr_status.html +++ clang/www/cxx_dr_status.html @@ -2547,7 +2547,7 @@ <td><a href="https://wg21.link/cwg418">418</a></td> <td>CD6</td> <td>Imperfect wording on error on multiple default arguments on a called function</td> - <td class="none" align="center">Unknown</td> + <td class="none" align="center">No</td> </tr> <tr class="open" id="419"> <td><a href="https://wg21.link/cwg419">419</a></td> Index: clang/test/CXX/drs/dr4xx.cpp =================================================================== --- clang/test/CXX/drs/dr4xx.cpp +++ clang/test/CXX/drs/dr4xx.cpp @@ -315,6 +315,50 @@ } } +namespace dr418 { // dr418: no +namespace example1 { +void f1(int, int = 0); +void f1(int = 0, int); + +void g() { f1(); } +} // namespace example1 + +namespace example2 { +namespace A { +void f2(int); // #dr418-f2-decl +} +namespace B { +using A::f2; +} +namespace A { +void f2(int = 3); +} +void g2() { + using B::f2; + f2(); // expected-error {{no matching function}} + // expected-note@#dr418-f2-decl {{requires 1 argument}} +} +} // namespace example2 + +// example from [over.match.best]/4 +namespace example3 { +namespace A { +extern "C" void f(int = 5); +} +namespace B { +extern "C" void f(int = 5); +} + +using A::f; +using B::f; + +void use() { + f(3); + f(); // FIXME: this should fail +} +} // namespace example3 +} // namespace dr418 + namespace dr420 { // dr420: yes template<typename T> struct ptr { T *operator->() const;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits