summaryrefslogtreecommitdiffstats
path: root/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-12-22 15:00:54 +0000
committerdim <dim@FreeBSD.org>2012-12-22 15:00:54 +0000
commit5b20025c30d23d521e12c1f33ec8fa6b821952cd (patch)
treed97cbb4c3a7d0c7da83f0baa1fa220f188e9c6df /test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
parent056abd2059c65a3e908193aeae16fad98017437c (diff)
downloadFreeBSD-src-5b20025c30d23d521e12c1f33ec8fa6b821952cd.zip
FreeBSD-src-5b20025c30d23d521e12c1f33ec8fa6b821952cd.tar.gz
Vendor import of clang tags/RELEASE_32/final r170710 (effectively, 3.2
release): http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final@170710
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 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
+ }
+}
OpenPOWER on IntegriCloud