Endill created this revision. Endill added a reviewer: clang-language-wg. Herald added a project: All. Endill requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
P1787 <https://reviews.llvm.org/P1787>: //CWG418 <https://cplusplus.github.io/CWG/issues/418.html> is resolved by trivial rephrasing along with that necessary for the new using-declaration interpretation.// Wording: see changes to [dcl.fct.default]/9 and [over.match.best]/4. Here's a caveat: [over.match.best]/4 includes an example <https://eel.is/c++draft/over.match.best#general-example-8> that is not properly diagnosed by Clang. While it is very relevant for the paragraph in question, I don't believe it is relevant for the issue itself, so I decided not to include it in the test. Repository: rG LLVM Github Monorepo 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="full" align="center">Yes</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,32 @@ } } +namespace dr418 { // dr418: yes +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-f3-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-f3-decl {{requires 1 argument}} +} +} // namespace example2 +} // 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="full" align="center">Yes</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,32 @@ } } +namespace dr418 { // dr418: yes +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-f3-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-f3-decl {{requires 1 argument}} +} +} // namespace example2 +} // 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