summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/destructor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/destructor.cpp')
-rw-r--r--test/SemaCXX/destructor.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/test/SemaCXX/destructor.cpp b/test/SemaCXX/destructor.cpp
index 6837cd4..ab3c809 100644
--- a/test/SemaCXX/destructor.cpp
+++ b/test/SemaCXX/destructor.cpp
@@ -40,9 +40,9 @@ struct F {
~F(); // expected-error {{destructor cannot be redeclared}}
};
-~; // expected-error {{expected the class name after '~' to name a destructor}}
+~; // expected-error {{expected a class name after '~' to name a destructor}}
~undef(); // expected-error {{expected the class name after '~' to name a destructor}}
-~operator+(int, int); // expected-error {{expected the class name after '~' to name a destructor}}
+~operator+(int, int); // expected-error {{expected a class name after '~' to name a destructor}}
~F(){} // expected-error {{destructor must be a non-static member function}}
struct G {
@@ -61,3 +61,20 @@ struct X {};
struct Y {
~X(); // expected-error {{expected the class name after '~' to name the enclosing class}}
};
+
+namespace PR6421 {
+ class T; // expected-note{{forward declaration}}
+
+ class QGenericArgument
+ {
+ template<typename U>
+ void foo(T t) // expected-error{{variable has incomplete type}}
+ { }
+
+ void disconnect()
+ {
+ T* t;
+ bob<QGenericArgument>(t); // expected-error{{undeclared identifier 'bob'}}
+ }
+ };
+}
OpenPOWER on IntegriCloud