r205273 - Add failing testcase for DR305. Looks like we didn't implement the resolution

Richard Smith richard-llvm at metafoo.co.uk
Mon Mar 31 18:58:11 PDT 2014


Author: rsmith
Date: Mon Mar 31 20:58:11 2014
New Revision: 205273

URL: http://llvm.org/viewvc/llvm-project?rev=205273&view=rev
Log:
Add failing testcase for DR305. Looks like we didn't implement the resolution
here in the simple-template-id case.

Modified:
    cfe/trunk/test/CXX/drs/dr3xx.cpp
    cfe/trunk/www/cxx_dr_status.html

Modified: cfe/trunk/test/CXX/drs/dr3xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr3xx.cpp?rev=205273&r1=205272&r2=205273&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr3xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr3xx.cpp Mon Mar 31 20:58:11 2014
@@ -82,7 +82,7 @@ namespace dr304 { // dr304: yes
 #endif
 }
 
-namespace dr305 { // dr305: yes
+namespace dr305 { // dr305: no
   struct A {
     typedef A C;
   };
@@ -109,6 +109,18 @@ namespace dr305 { // dr305: yes
     x->~X<char>(); // expected-error {{no member named}}
   }
 
+  // FIXME: This appears to be valid (but allowing the nested types might be a
+  // defect).
+  template<typename> struct Nested {
+    template<typename> struct Nested {};
+  };
+  void testNested(Nested<int> n) { n.~Nested<int>(); } // expected-error {{no member named}}
+#if __cplusplus < 201103L
+  // expected-error at -2 {{ambiguous}}
+  // expected-note at -6 {{here}}
+  // expected-note at -6 {{here}}
+#endif
+
 #if __cplusplus >= 201103L
   struct Y {
     template<typename T> using T1 = Y;
@@ -127,6 +139,13 @@ namespace dr305 { // dr305: yes
     z->~T2<int>(); // expected-error {{no member named '~int'}}
     z->~T2<Z>();
   }
+
+  // FIXME: This is valid.
+  namespace Q {
+    template<typename A> struct R {};
+  }
+  template<typename A> using R = Q::R<int>;
+  void qr(Q::R<int> x) { x.~R<char>(); } // expected-error {{no member named}}
 #endif
 }
 

Modified: cfe/trunk/www/cxx_dr_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_dr_status.html?rev=205273&r1=205272&r2=205273&view=diff
==============================================================================
--- cfe/trunk/www/cxx_dr_status.html (original)
+++ cfe/trunk/www/cxx_dr_status.html Mon Mar 31 20:58:11 2014
@@ -1871,7 +1871,7 @@ of class templates</td>
     <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#305">305</a></td>
     <td>CD1</td>
     <td>Name lookup in destructor call</td>
-    <td class="full" align="center">Yes</td>
+    <td class="none" align="center">No</td>
   </tr>
   <tr id="306">
     <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#306">306</a></td>
@@ -2525,7 +2525,7 @@ of class templates</td>
     <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#414">414</a></td>
     <td>CD1</td>
     <td>Multiple types found on destructor lookup</td>
-    <td class="full" align="center">Duplicate of <a href="#305">305</a></td>
+    <td class="none" align="center">Duplicate of <a href="#305">305</a></td>
   </tr>
   <tr id="415">
     <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#415">415</a></td>





More information about the cfe-commits mailing list