Author: Vlad Serebrennikov Date: 2023-02-11T10:53:08+03:00 New Revision: 5fc73b7502fbbb46faa57a558c8661822b2b5215
URL: https://github.com/llvm/llvm-project/commit/5fc73b7502fbbb46faa57a558c8661822b2b5215 DIFF: https://github.com/llvm/llvm-project/commit/5fc73b7502fbbb46faa57a558c8661822b2b5215.diff LOG: [clang] Add test for CWG1111 Also mark [[ https://wg21.link/cwg2385 | CWG2385 ]] as `na`, because it eliminates wording inconsistency introduced by [[ https://wg21.link/cwg1111 | CWG1111 ]] resolution. Reviewed By: #clang-language-wg, erichkeane Differential Revision: https://reviews.llvm.org/D142315 Added: Modified: clang/test/CXX/drs/dr11xx.cpp clang/test/CXX/drs/dr23xx.cpp clang/www/cxx_dr_status.html Removed: ################################################################################ diff --git a/clang/test/CXX/drs/dr11xx.cpp b/clang/test/CXX/drs/dr11xx.cpp index 81fbc1e3ef1b..23756ff1927e 100644 --- a/clang/test/CXX/drs/dr11xx.cpp +++ b/clang/test/CXX/drs/dr11xx.cpp @@ -4,6 +4,46 @@ // RUN: %clang_cc1 -std=c++17 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors // RUN: %clang_cc1 -std=c++2a %s -verify -fexceptions -fcxx-exceptions -pedantic-errors +namespace dr1111 { // dr1111: yes +namespace example1 { +template <typename> struct set; + +struct X { + template <typename T> void set(const T &value); +}; +void foo() { + X x; +#pragma clang diagnostic push +#if __cplusplus < 201103L +#pragma clang diagnostic ignored "-Wambiguous-member-template" +#endif + x.set<double>(3.2); +#pragma clang diagnostic pop +} + +struct Y {}; +void bar() { + Y y; + y.set<double>(3.2); // expected-error {{no member named 'set' in 'dr1111::example1::Y'}} +} +} // namespace example1 + +namespace example2 { +struct A {}; +namespace N { +struct A { + void g() {} + template <class T> operator T(); +}; +} // namespace N + +void baz() { + N::A a; + a.operator A(); +} +} // namespace example2 +} // namespace dr1111 + namespace dr1113 { // dr1113: partial namespace named { extern int a; // expected-note {{previous}} diff --git a/clang/test/CXX/drs/dr23xx.cpp b/clang/test/CXX/drs/dr23xx.cpp index 371ead504bf3..59e1f27491d2 100644 --- a/clang/test/CXX/drs/dr23xx.cpp +++ b/clang/test/CXX/drs/dr23xx.cpp @@ -169,6 +169,8 @@ void g() { } //namespace dr2303 #endif +// dr2385: na + namespace dr2394 { // dr2394: 15 struct A {}; diff --git a/clang/www/cxx_dr_status.html b/clang/www/cxx_dr_status.html index 39e5a64d571f..8123c476abb8 100755 --- a/clang/www/cxx_dr_status.html +++ b/clang/www/cxx_dr_status.html @@ -6473,7 +6473,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://wg21.link/cwg1111">1111</a></td> <td>C++11</td> <td>Remove dual-scope lookup of member template names</td> - <td class="none" align="center">Unknown</td> + <td class="full" align="center">Yes</td> </tr> <tr id="1112"> <td><a href="https://wg21.link/cwg1112">1112</a></td> @@ -14117,7 +14117,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2> <td><a href="https://wg21.link/cwg2385">2385</a></td> <td>CD5</td> <td>Lookup for <I>conversion-function-id</I>s</td> - <td class="none" align="center">Unknown</td> + <td class="na" align="center">N/A</td> </tr> <tr id="2386"> <td><a href="https://wg21.link/cwg2386">2386</a></td> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits