diff options
author | Mike Stump <mrs@apple.com> | 2010-01-19 23:08:01 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2010-01-19 23:08:01 +0000 |
commit | 314825bc8ac6ef3245ca4c1b3aee89f0da2632f6 (patch) | |
tree | 7c39f72d4602cc590c50eb3547710043026796e7 /clang/test/Sema/scope-check.c | |
parent | 99469702a359b723352d251ce994bfaeaa15e306 (diff) | |
download | bcm5719-llvm-314825bc8ac6ef3245ca4c1b3aee89f0da2632f6.tar.gz bcm5719-llvm-314825bc8ac6ef3245ca4c1b3aee89f0da2632f6.zip |
Implement goto inside of blocks.
llvm-svn: 93945
Diffstat (limited to 'clang/test/Sema/scope-check.c')
-rw-r--r-- | clang/test/Sema/scope-check.c | 11 |
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; }; } |