[PATCH] D142316: [clang] Add test for CWG2396

Vlad Serebrennikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 12 23:51:27 PST 2023


Endill updated this revision to Diff 496849.
Endill added a comment.

Remove two examples with `identity<B>` for reasons explained in D142316#4121079 <https://reviews.llvm.org/D142316#4121079>.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142316

Files:
  clang/test/CXX/drs/dr12xx.cpp
  clang/test/CXX/drs/dr23xx.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
@@ -7553,7 +7553,7 @@
     <td><a href="https://wg21.link/cwg1291">1291</a></td>
     <td>CD6</td>
     <td>Looking up a <I>conversion-type-id</I></td>
-    <td class="none" align="center">Unknown</td>
+    <td class="na" align="center">N/A</td>
   </tr>
   <tr id="1292">
     <td><a href="https://wg21.link/cwg1292">1292</a></td>
@@ -14183,7 +14183,7 @@
     <td><a href="https://wg21.link/cwg2396">2396</a></td>
     <td>CD6</td>
     <td>Lookup of names in complex <I>conversion-type-id</I>s</td>
-    <td class="none" align="center">Unknown</td>
+    <td class="none" align="center">No</td>
   </tr>
   <tr id="2397">
     <td><a href="https://wg21.link/cwg2397">2397</a></td>
Index: clang/test/CXX/drs/dr23xx.cpp
===================================================================
--- clang/test/CXX/drs/dr23xx.cpp
+++ clang/test/CXX/drs/dr23xx.cpp
@@ -181,3 +181,19 @@
 B b;
 
 }
+
+namespace dr2396 { // dr2396: no
+  struct A {
+    struct B;
+    operator B B::*();
+  };
+  struct B;
+
+  // FIXME: per P1787 "Calling a conversion function" example, all of the
+  // examples below are well-formed, with B resolving to A::B, but currently
+  // it's been resolved to dr2396::B. 
+
+  // void f(A a) { a.operator B B::*(); }            
+  // void g(A a) { a.operator decltype(B()) B::*(); }
+  // void g2(A a) { a.operator B decltype(B())::*(); }
+}
Index: clang/test/CXX/drs/dr12xx.cpp
===================================================================
--- clang/test/CXX/drs/dr12xx.cpp
+++ clang/test/CXX/drs/dr12xx.cpp
@@ -68,6 +68,8 @@
 #endif
 }
 
+// dr1291: na
+
 namespace dr1295 { // dr1295: 4
   struct X {
     unsigned bitfield : 4;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142316.496849.patch
Type: text/x-patch
Size: 1827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230213/766f6f62/attachment.bin>


More information about the cfe-commits mailing list