summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CXX/basic/basic.scope/basic.scope.local/p2.cpp23
-rw-r--r--test/Parser/bracket-crash.cpp3
2 files changed, 26 insertions, 0 deletions
diff --git a/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp b/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
index 91e96b6..7c7b84d 100644
--- a/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
+++ b/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
@@ -35,3 +35,26 @@ void func7() {
int i; // expected-error{{redefinition of 'i'}}
}
}
+
+void func8() {
+ int i;
+ try {
+ int i;
+ } catch (...) {
+ }
+}
+
+void func9() {
+ if (bool b = true)
+ try {
+ int b; // FIXME: this probably should be invalid, maybe
+ } catch (...) {
+ }
+}
+
+void func10() {
+ if (bool b = true)
+ if (true) {
+ int b; // FIXME: decide whether this is valid
+ }
+}
diff --git a/test/Parser/bracket-crash.cpp b/test/Parser/bracket-crash.cpp
index bcc6eab..93b5294 100644
--- a/test/Parser/bracket-crash.cpp
+++ b/test/Parser/bracket-crash.cpp
@@ -4,3 +4,6 @@ decltype(;
struct{
a
}
+
+// PR14549. Must be at end of file.
+decltype(
OpenPOWER on IntegriCloud