summaryrefslogtreecommitdiff
path: root/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/basic/basic.scope/basic.scope.local/p2.cpp')
-rw-r--r--test/CXX/basic/basic.scope/basic.scope.local/p2.cpp23
1 files changed, 23 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 91e96b6b26..7c7b84d678 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
+ }
+}