summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/scope-check.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/scope-check.c')
-rw-r--r--clang/test/Sema/scope-check.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/test/Sema/scope-check.c b/clang/test/Sema/scope-check.c
index 4d3f6cbcf2b..74bc7c46f8f 100644
--- a/clang/test/Sema/scope-check.c
+++ b/clang/test/Sema/scope-check.c
@@ -181,15 +181,14 @@ void test11(int n) {
// TODO: When and if gotos are allowed in blocks, this should work.
void test12(int n) {
void *P = ^{
- goto L1; // expected-error {{goto not allowed in block literal}}
+ goto L1;
L1:
- goto L2; // expected-error {{goto not allowed in block literal}}
+ goto L2;
L2:
- goto L3; // expected-error {{goto not allowed in block literal}}
- // todo-error {{illegal goto into protected scope}}
- int Arr[n]; // todo-note {{jump bypasses initialization of variable length array}}
+ goto L3; // expected-error {{illegal goto into protected scope}}
+ int Arr[n]; // expected-note {{jump bypasses initialization of variable length array}}
L3:
- goto L4; // expected-error {{goto not allowed in block literal}}
+ goto L4;
L4: return;
};
}
OpenPOWER on IntegriCloud