[PATCH] D149003: [clang] Add test for CWG1821
Vlad Serebrennikov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 24 23:04:00 PDT 2023
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 at -1 {{non-friend class member 'f' cannot have a qualified name}}
+
+ struct C {
+ void f();
+ };
+ void C::f() {}
+ // expected-error at -1 {{non-friend class member 'f' cannot have a qualified name}}
+};
+} // namespace dr1821
+
namespace dr1822 { // dr1822: yes
#if __cplusplus >= 201103L
int a;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149003.516628.patch
Type: text/x-patch
Size: 1254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230425/4806387c/attachment.bin>
More information about the cfe-commits
mailing list