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

Also mark CWG1291 and CWG2385 as "na".

P1787 <https://reviews.llvm.org/P1787>: CWG1291 and CWG2396 are resolved by 
explicitly specifying how to look up names in a conversion-type-id.
Wording: see changes to [basic.lookup.unqual]/5 and [basic.lookup.qual]/2.

"Calling a conversion function" example in P1787 
<https://reviews.llvm.org/P1787> is also relevant.


Repository:
  rG LLVM Github Monorepo

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>
@@ -14117,7 +14117,7 @@
     <td><a href="https://wg21.link/cwg2385";>2385</a></td>
     <td>CD5</td>
     <td>Lookup for <I>conversion-function-id</I>s</td>
-    <td class="none" align="center">Unknown</td>
+    <td class="na" align="center">N/A</td>
   </tr>
   <tr id="2386">
     <td><a href="https://wg21.link/cwg2386";>2386</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
@@ -169,6 +169,8 @@
 } //namespace dr2303
 #endif
 
+// dr2385: na
+
 namespace dr2394 { // dr2394: 15
 
 struct A {};
@@ -179,3 +181,26 @@
 B b;
 
 }
+
+namespace dr2396 { // dr2396: no
+  template<typename T>
+  struct identity {
+    typedef T type;
+  };
+
+  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())::*(); }
+  // void h(A a) { a.operator identity<B>::type B::*(); }  
+  // void h2(A a) { a.operator B identity<B>::type::*(); } 
+}
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;


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>
@@ -14117,7 +14117,7 @@
     <td><a href="https://wg21.link/cwg2385";>2385</a></td>
     <td>CD5</td>
     <td>Lookup for <I>conversion-function-id</I>s</td>
-    <td class="none" align="center">Unknown</td>
+    <td class="na" align="center">N/A</td>
   </tr>
   <tr id="2386">
     <td><a href="https://wg21.link/cwg2386";>2386</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
@@ -169,6 +169,8 @@
 } //namespace dr2303
 #endif
 
+// dr2385: na
+
 namespace dr2394 { // dr2394: 15
 
 struct A {};
@@ -179,3 +181,26 @@
 B b;
 
 }
+
+namespace dr2396 { // dr2396: no
+  template<typename T>
+  struct identity {
+    typedef T type;
+  };
+
+  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())::*(); }
+  // void h(A a) { a.operator identity<B>::type B::*(); }  
+  // void h2(A a) { a.operator B identity<B>::type::*(); } 
+}
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;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to