From: Richard Smith Date: Fri, 17 Oct 2014 01:03:17 +0000 (+0000) Subject: Per comments on PR12350, move DR244 back from 'done' to 'partial' and add tests showi... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2425bc0afb2695bd0b970e76aaed100919f0602;p=clang Per comments on PR12350, move DR244 back from 'done' to 'partial' and add tests showing what we get wrong. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220009 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CXX/drs/dr2xx.cpp b/test/CXX/drs/dr2xx.cpp index d8b88355a4..e4e7554e77 100644 --- a/test/CXX/drs/dr2xx.cpp +++ b/test/CXX/drs/dr2xx.cpp @@ -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 struct E {}; + typedef E 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 diff --git a/www/cxx_dr_status.html b/www/cxx_dr_status.html index b273c63bbe..8b123ea7f5 100644 --- a/www/cxx_dr_status.html +++ b/www/cxx_dr_status.html @@ -1504,7 +1504,7 @@ accessible? 244 CD1 Destructor lookup - Clang 3.5 + Partial 245