This revision was automatically updated to reflect the committed changes. Closed by commit rG5cda0d165a75: [clang] Add test for CWG1821 (authored by Endill).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149003/new/ https://reviews.llvm.org/D149003 Files: clang/test/CXX/drs/dr18xx.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 @@ -10733,7 +10733,7 @@ <td><a href="https://cplusplus.github.io/CWG/issues/1821.html">1821</a></td> <td>CD6</td> <td>Qualified redeclarations in a class <I>member-specification</I></td> - <td class="none" align="center">Unknown</td> + <td class="full" align="center">Yes</td> </tr> <tr id="1822"> <td><a href="https://cplusplus.github.io/CWG/issues/1822.html">1822</a></td> Index: clang/test/CXX/drs/dr18xx.cpp =================================================================== --- clang/test/CXX/drs/dr18xx.cpp +++ clang/test/CXX/drs/dr18xx.cpp @@ -51,6 +51,22 @@ #endif } +namespace dr1821 { // dr1821: yes +struct A { + template <typename> struct B { + void f(); + }; + template <typename T> void B<T>::f(){}; + // expected-error@-1 {{non-friend class member 'f' cannot have a qualified name}} + + struct C { + void f(); + }; + void C::f() {} + // expected-error@-1 {{non-friend class member 'f' cannot have a qualified name}} +}; +} // namespace dr1821 + namespace dr1822 { // dr1822: yes #if __cplusplus >= 201103L int a;
Index: clang/www/cxx_dr_status.html =================================================================== --- clang/www/cxx_dr_status.html +++ clang/www/cxx_dr_status.html @@ -10733,7 +10733,7 @@ <td><a href="https://cplusplus.github.io/CWG/issues/1821.html">1821</a></td> <td>CD6</td> <td>Qualified redeclarations in a class <I>member-specification</I></td> - <td class="none" align="center">Unknown</td> + <td class="full" align="center">Yes</td> </tr> <tr id="1822"> <td><a href="https://cplusplus.github.io/CWG/issues/1822.html">1822</a></td> Index: clang/test/CXX/drs/dr18xx.cpp =================================================================== --- clang/test/CXX/drs/dr18xx.cpp +++ clang/test/CXX/drs/dr18xx.cpp @@ -51,6 +51,22 @@ #endif } +namespace dr1821 { // dr1821: yes +struct A { + template <typename> struct B { + void f(); + }; + template <typename T> void B<T>::f(){}; + // expected-error@-1 {{non-friend class member 'f' cannot have a qualified name}} + + struct C { + void f(); + }; + void C::f() {} + // expected-error@-1 {{non-friend class member 'f' cannot have a qualified name}} +}; +} // namespace dr1821 + namespace dr1822 { // dr1822: yes #if __cplusplus >= 201103L int a;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits