aboutsummaryrefslogtreecommitdiff
path: root/test/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser')
-rw-r--r--test/Parser/cxx-throw.cpp2
-rw-r--r--test/Parser/cxx11-type-specifier.cpp7
2 files changed, 9 insertions, 0 deletions
diff --git a/test/Parser/cxx-throw.cpp b/test/Parser/cxx-throw.cpp
index d63b6d4cae..a1be710fb5 100644
--- a/test/Parser/cxx-throw.cpp
+++ b/test/Parser/cxx-throw.cpp
@@ -13,3 +13,5 @@ void foo() {
__extension__ throw 1; // expected-error {{expected expression}}
(void)throw; // expected-error {{expected expression}}
}
+
+void f() throw(static); // expected-error {{expected a type}} expected-error {{does not allow storage class}}
diff --git a/test/Parser/cxx11-type-specifier.cpp b/test/Parser/cxx11-type-specifier.cpp
index 2e629f3ab5..212ffb407b 100644
--- a/test/Parser/cxx11-type-specifier.cpp
+++ b/test/Parser/cxx11-type-specifier.cpp
@@ -18,3 +18,10 @@ void f() {
(void) new struct S {}; // expected-error{{'S' can not be defined in a type specifier}}
(void) new enum E { e }; // expected-error{{'E' can not be defined in a type specifier}}
}
+
+// And for trailing-type-specifier-seq
+
+// FIXME: Don't treat an ill-formed trailing-return-type the same as no
+// trailing-return-type, and avoid the second diagnostic.
+auto f() -> unknown; // expected-error{{unknown type name 'unknown'}} \
+ expected-error{{'auto' return without trailing return type}}