summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-18 22:56:52 +0000
committerChris Lattner <sabre@nondot.org>2009-04-18 22:56:52 +0000
commita0cfd6b610d3fe4058392acaa5747f1511f41c02 (patch)
tree75e80449f7ea00214dfafefb122bf55cfe7d5319 /clang
parentfb5ef701d53a5fda3e505d5740cfad5141740a9f (diff)
downloadbcm5719-llvm-a0cfd6b610d3fe4058392acaa5747f1511f41c02.tar.gz
bcm5719-llvm-a0cfd6b610d3fe4058392acaa5747f1511f41c02.zip
rearrange.
llvm-svn: 69490
Diffstat (limited to 'clang')
-rw-r--r--clang/test/Sema/scope-check.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/clang/test/Sema/scope-check.c b/clang/test/Sema/scope-check.c
index 181b6c5aa49..10316950fe9 100644
--- a/clang/test/Sema/scope-check.c
+++ b/clang/test/Sema/scope-check.c
@@ -57,17 +57,21 @@ void test7(int x) {
}
int test8(int x) {
- if (x) goto L; // expected-error {{illegal goto into protected scope}}
+ // For statement.
goto L2; // expected-error {{illegal goto into protected scope}}
-
for (int arr[x]; // expected-note {{jump bypasses initialization of variable length array}}
- ; ++x) {
-
+ ; ++x)
L2:;
- }
+
+ // Statement expressions.
+ goto L3; // expected-error {{illegal goto into protected scope}}
+ int Y = ({ int a[x]; // expected-note {{jump bypasses initialization of variable length array}}
+ L3: 4; });
+ // Statement expressions 2.
+ goto L1; // expected-error {{illegal goto into protected scope}}
return x == ({
int a[x]; // expected-note {{jump bypasses initialization of variable length array}}
- L:
+ L1:
42; });
}
OpenPOWER on IntegriCloud