summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/drs/dr2xx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CXX/drs/dr2xx.cpp')
-rw-r--r--clang/test/CXX/drs/dr2xx.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/test/CXX/drs/dr2xx.cpp b/clang/test/CXX/drs/dr2xx.cpp
index 692ed1d1afd..bb9af9fd933 100644
--- a/clang/test/CXX/drs/dr2xx.cpp
+++ b/clang/test/CXX/drs/dr2xx.cpp
@@ -466,7 +466,7 @@ namespace dr243 { // dr243: yes
A a2 = b; // expected-error {{ambiguous}}
}
-namespace dr244 { // dr244: no
+namespace dr244 { // dr244: 3.5
struct B {}; struct D : B {}; // expected-note {{here}}
D D_object;
@@ -480,7 +480,7 @@ namespace dr244 { // dr244: no
B_ptr->~B_alias();
B_ptr->B_alias::~B();
// This is valid under DR244.
- B_ptr->B_alias::~B_alias(); // FIXME: expected-error {{expected the class name after '~' to name a destructor}}
+ B_ptr->B_alias::~B_alias();
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}}
}
@@ -1013,11 +1013,16 @@ namespace dr298 { // dr298: yes
B::B() {} // expected-error {{requires a type specifier}}
B::A() {} // ok
- C::~C() {} // expected-error {{expected the class name}}
- C::~A() {} // ok
+ C::~C() {} // expected-error {{destructor cannot be declared using a typedef 'C' (aka 'const dr298::A') of the class name}}
typedef struct D E; // expected-note {{here}}
struct E {}; // expected-error {{conflicts with typedef}}
+
+ struct F {
+ ~F();
+ };
+ typedef const F G;
+ G::~F() {} // ok
}
namespace dr299 { // dr299: yes c++11
OpenPOWER on IntegriCloud