[PATCH] D122674: [clang][DR] Test and mark DR1305 as complete

Markus Böck via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 29 11:43:51 PDT 2022


zero9178 updated this revision to Diff 418941.
zero9178 added a comment.

Address reviewers comments: Group test nicely with the other dr namespaces.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122674/new/

https://reviews.llvm.org/D122674

Files:
  clang/test/CXX/drs/dr13xx.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
@@ -7644,7 +7644,7 @@
     <td><a href="https://wg21.link/cwg1305">1305</a></td>
     <td>CD3</td>
     <td><TT>alignof</TT> applied to array of unknown size</td>
-    <td class="none" align="center">Unknown</td>
+    <td class="full" align="center">Yes</td>
   </tr>
   <tr id="1306">
     <td><a href="https://wg21.link/cwg1306">1306</a></td>
Index: clang/test/CXX/drs/dr13xx.cpp
===================================================================
--- clang/test/CXX/drs/dr13xx.cpp
+++ clang/test/CXX/drs/dr13xx.cpp
@@ -13,6 +13,16 @@
   };
 }
 
+#if __cplusplus >= 201103L
+namespace dr1305 { // dr1305: yes
+struct Incomplete; // expected-note {{forward declaration of 'dr1305::Incomplete'}}
+struct Complete {};
+
+int incomplete = alignof(Incomplete(&)[]); // expected-error {{invalid application of 'alignof' to an incomplete type 'dr1305::Incomplete'}}
+int complete = alignof(Complete(&)[]);
+}
+#endif
+
 namespace dr1310 { // dr1310: 5
   struct S {} * sp = new S::S; // expected-error {{qualified reference to 'S' is a constructor name}}
   void f() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122674.418941.patch
Type: text/x-patch
Size: 1234 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220329/83ecf05e/attachment-0001.bin>


More information about the cfe-commits mailing list