]> granicus.if.org Git - clang/commitdiff
Per comments on PR12350, move DR244 back from 'done' to 'partial' and add tests showi...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 17 Oct 2014 01:03:17 +0000 (01:03 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 17 Oct 2014 01:03:17 +0000 (01:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220009 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/drs/dr2xx.cpp
www/cxx_dr_status.html

index d8b88355a4a6e7f08cf18fa0594854a78da2ca2a..e4e7554e77d8a7a093752ad83d4abdbf62446649 100644 (file)
@@ -467,7 +467,7 @@ namespace dr243 { // dr243: yes
   A a2 = b; // expected-error {{ambiguous}}
 }
 
-namespace dr244 { // dr244: 3.5
+namespace dr244 { // dr244: partial
   struct B {}; struct D : B {}; // expected-note {{here}}
 
   D D_object;
@@ -485,6 +485,28 @@ namespace dr244 { // dr244: 3.5
     B_ptr->dr244::~B(); // expected-error {{refers to a member in namespace}}
     B_ptr->dr244::~B_alias(); // expected-error {{refers to a member in namespace}}
   }
+
+  namespace N {
+    template<typename T> struct E {};
+    typedef E<int> F;
+  }
+  void g(N::F f) {
+    typedef N::F G;
+    f.~G();
+    f.G::~E();
+    f.G::~F(); // expected-error {{expected the class name after '~' to name a destructor}}
+    f.G::~G();
+    // This is technically ill-formed; E is looked up in 'N::' and names the
+    // class template, not the injected-class-name of the class. But that's
+    // probably a bug in the standard.
+    f.N::F::~E();
+    // This is valid; we look up the second F in the same scope in which we
+    // found the first one, that is, 'N::'.
+    f.N::F::~F(); // FIXME: expected-error {{expected the class name after '~' to name a destructor}}
+    // This is technically ill-formed; G is looked up in 'N::' and is not found;
+    // as above, this is probably a bug in the standard.
+    f.N::F::~G();
+  }
 }
 
 namespace dr245 { // dr245: yes
index b273c63bbe31b9af3a6071e77d0e2adb310b7c16..8b123ea7f5ae73f96c43e8aea802bd4aa2593cf8 100644 (file)
@@ -1504,7 +1504,7 @@ accessible?</td>
     <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#244">244</a></td>
     <td>CD1</td>
     <td>Destructor lookup</td>
-    <td class="full" align="center">Clang 3.5</td>
+    <td class="partial" align="center">Partial</td>
   </tr>
   <tr id="245">
     <td><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#245">245</a></td>