r220009 - Per comments on PR12350, move DR244 back from 'done' to 'partial' and add tests showing what we get wrong.
Richard Smith
richard-llvm at metafoo.co.uk
Thu Oct 16 18:03:17 PDT 2014
Author: rsmith
Date: Thu Oct 16 20:03:17 2014
New Revision: 220009
URL: http://llvm.org/viewvc/llvm-project?rev=220009&view=rev
Log:
Per comments on PR12350, move DR244 back from 'done' to 'partial' and add tests showing what we get wrong.
Modified:
cfe/trunk/test/CXX/drs/dr2xx.cpp
cfe/trunk/www/cxx_dr_status.html
Modified: cfe/trunk/test/CXX/drs/dr2xx.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/drs/dr2xx.cpp?rev=220009&r1=220008&r2=220009&view=diff
==============================================================================
--- cfe/trunk/test/CXX/drs/dr2xx.cpp (original)
+++ cfe/trunk/test/CXX/drs/dr2xx.cpp Thu Oct 16 20:03:17 2014
@@ -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
Modified: cfe/trunk/www/cxx_dr_status.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_dr_status.html?rev=220009&r1=220008&r2=220009&view=diff
==============================================================================
--- cfe/trunk/www/cxx_dr_status.html (original)
+++ cfe/trunk/www/cxx_dr_status.html Thu Oct 16 20:03:17 2014
@@ -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>
More information about the cfe-commits
mailing list