summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/scope-check-try-catch.m
blob: d28cc85e9cc5cb171f78138954ae61b7b1a2a4f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// RUN: clang-cc -fsyntax-only -verify %s

@class A, B, C;

void f() {
  goto L; // expected-error{{illegal jump}}
  goto L2; // expected-error{{illegal jump}}
  goto L3; // expected-error{{illegal jump}}
  @try {
L: ;
  } @catch (A *x) {
L2: ;
  } @catch (B *x) {
  } @catch (C *c) {
  } @finally {
L3: ;
  }
}

void f0(int a) {
  if (a) goto L0;
  @try {} @finally {}
 L0:
  return;
}
OpenPOWER on IntegriCloud