diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
| commit | dbe13110f59f48b4dbb7552b3ac2935acdeece7f (patch) | |
| tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/SemaCXX/exceptions.cpp | |
| parent | 9da628931ebf2609493570f87824ca22402cc65f (diff) | |
Notes
Diffstat (limited to 'test/SemaCXX/exceptions.cpp')
| -rw-r--r-- | test/SemaCXX/exceptions.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/SemaCXX/exceptions.cpp b/test/SemaCXX/exceptions.cpp index e2bfe1839467..486d88eab7be 100644 --- a/test/SemaCXX/exceptions.cpp +++ b/test/SemaCXX/exceptions.cpp @@ -12,8 +12,8 @@ void trys() { } catch(float i) { } catch(void v) { // expected-error {{cannot catch incomplete type 'void'}} } catch(A a) { // expected-error {{cannot catch incomplete type 'A'}} - } catch(A *a) { // expected-warning {{ISO C++ forbids catching a pointer to incomplete type 'A'}} - } catch(A &a) { // expected-warning {{ISO C++ forbids catching a reference to incomplete type 'A'}} + } catch(A *a) { // expected-error {{cannot catch pointer to incomplete type 'A'}} + } catch(A &a) { // expected-error {{cannot catch reference to incomplete type 'A'}} } catch(Abstract) { // expected-error {{variable type 'Abstract' is an abstract class}} } catch(...) { int j = i; // expected-error {{use of undeclared identifier 'i'}} @@ -35,37 +35,37 @@ void throws() { void jumps() { l1: goto l5; - goto l4; // expected-error {{illegal goto into protected scope}} - goto l3; // expected-error {{illegal goto into protected scope}} - goto l2; // expected-error {{illegal goto into protected scope}} + goto l4; // expected-error {{goto into protected scope}} + goto l3; // expected-error {{goto into protected scope}} + goto l2; // expected-error {{goto into protected scope}} goto l1; try { // expected-note 4 {{jump bypasses initialization of try block}} l2: goto l5; - goto l4; // expected-error {{illegal goto into protected scope}} - goto l3; // expected-error {{illegal goto into protected scope}} + goto l4; // expected-error {{goto into protected scope}} + goto l3; // expected-error {{goto into protected scope}} goto l2; goto l1; } catch(int) { // expected-note 4 {{jump bypasses initialization of catch block}} l3: goto l5; - goto l4; // expected-error {{illegal goto into protected scope}} + goto l4; // expected-error {{goto into protected scope}} goto l3; - goto l2; // expected-error {{illegal goto into protected scope}} + goto l2; // expected-error {{goto into protected scope}} goto l1; } catch(...) { // expected-note 4 {{jump bypasses initialization of catch block}} l4: goto l5; goto l4; - goto l3; // expected-error {{illegal goto into protected scope}} - goto l2; // expected-error {{illegal goto into protected scope}} + goto l3; // expected-error {{goto into protected scope}} + goto l2; // expected-error {{goto into protected scope}} goto l1; } l5: goto l5; - goto l4; // expected-error {{illegal goto into protected scope}} - goto l3; // expected-error {{illegal goto into protected scope}} - goto l2; // expected-error {{illegal goto into protected scope}} + goto l4; // expected-error {{goto into protected scope}} + goto l3; // expected-error {{goto into protected scope}} + goto l2; // expected-error {{goto into protected scope}} goto l1; } |
