summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-11-12 22:25:41 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-11-12 22:25:41 +0000
commit1d6178065c327015a5c80bf95696f61ad2a7a85d (patch)
tree576b5fdb6a1c82c766d57219d0e0a54b9c461706 /clang/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
parent29424311754406f71d32cd2802d7c7687cfb4ad2 (diff)
downloadbcm5719-llvm-1d6178065c327015a5c80bf95696f61ad2a7a85d.tar.gz
bcm5719-llvm-1d6178065c327015a5c80bf95696f61ad2a7a85d.zip
Fix more try scoping bugs introduced by r167650.
Introduces more clear scoping flags & flag combinations which should hopefully be more understandable. llvm-svn: 167766
Diffstat (limited to 'clang/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp')
-rw-r--r--clang/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp b/clang/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
index 91e96b6b262..7c7b84d6782 100644
--- a/clang/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
+++ b/clang/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
+ }
+}
OpenPOWER on IntegriCloud