summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/exceptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/exceptions.cpp')
-rw-r--r--test/SemaCXX/exceptions.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/SemaCXX/exceptions.cpp b/test/SemaCXX/exceptions.cpp
index e2bfe18..486d88e 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;
}
OpenPOWER on IntegriCloud