[PATCH] D151032: [clang] Add test for CWG2213

Vlad Serebrennikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 20 09:00:06 PDT 2023


Endill created this revision.
Endill added reviewers: clang-language-wg, shafik, cor3ntin.
Herald added a project: All.
Endill requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

P1787 <https://wg21.link/p1787>: CWG2213 is resolved by allowing an elaborated-type-specifier to contain a simple-template-id without friend.
Wording: see changes to [dcl.type.elab]]/1.

The gist of the issue is that forward declaration of partial class template specialization was disallowed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151032

Files:
  clang/test/CXX/drs/dr22xx.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
@@ -13085,7 +13085,7 @@
     <td><a href="https://cplusplus.github.io/CWG/issues/2213.html">2213</a></td>
     <td>CD6</td>
     <td>Forward declaration of partial specializations</td>
-    <td class="none" align="center">Unknown</td>
+    <td class="full" align="center">Yes</td>
   </tr>
   <tr id="2214">
     <td><a href="https://cplusplus.github.io/CWG/issues/2214.html">2214</a></td>
Index: clang/test/CXX/drs/dr22xx.cpp
===================================================================
--- clang/test/CXX/drs/dr22xx.cpp
+++ clang/test/CXX/drs/dr22xx.cpp
@@ -14,6 +14,14 @@
 }
 #endif
 
+namespace dr2213 { // dr2213: yes
+template <typename T, typename U>
+struct A;
+
+template <typename U>
+struct A<int, U>;
+} // namespace dr2213
+
 namespace dr2229 { // dr2229: 7
 struct AnonBitfieldQualifiers {
   const unsigned : 1; // expected-error {{anonymous bit-field cannot have qualifiers}}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151032.524040.patch
Type: text/x-patch
Size: 1069 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230520/d33a7989/attachment.bin>


More information about the cfe-commits mailing list