diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-09-06 00:24:58 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-09-06 00:24:58 +0000 |
commit | 091405d7e3ad525f744dfe0990718d6a6f201721 (patch) | |
tree | 3661fe98c1717be9354598275f4aa945635cf418 /clang/test/SemaCXX/exceptions.cpp | |
parent | 5e44ffdb3e463a1041f9f1b3dea7a90d25b97b33 (diff) | |
download | bcm5719-llvm-091405d7e3ad525f744dfe0990718d6a6f201721.tar.gz bcm5719-llvm-091405d7e3ad525f744dfe0990718d6a6f201721.zip |
Reword switch/goto diagnostics "protected scope" diagnostics. Making up a term
"protected scope" is very unhelpful here and actively confuses users. Instead,
simply state the nature of the problem in the diagnostic: we cannot jump from
here to there. The notes explain nicely why not.
llvm-svn: 217293
Diffstat (limited to 'clang/test/SemaCXX/exceptions.cpp')
-rw-r--r-- | clang/test/SemaCXX/exceptions.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/clang/test/SemaCXX/exceptions.cpp b/clang/test/SemaCXX/exceptions.cpp index c2ca9f952b2..9646a9c3b31 100644 --- a/clang/test/SemaCXX/exceptions.cpp +++ b/clang/test/SemaCXX/exceptions.cpp @@ -35,37 +35,37 @@ void throws() { void jumps() { l1: goto l5; - 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 l4; // expected-error {{cannot jump}} + goto l3; // expected-error {{cannot jump}} + goto l2; // expected-error {{cannot jump}} goto l1; try { // expected-note 4 {{jump bypasses initialization of try block}} l2: goto l5; - goto l4; // expected-error {{goto into protected scope}} - goto l3; // expected-error {{goto into protected scope}} + goto l4; // expected-error {{cannot jump}} + goto l3; // expected-error {{cannot jump}} goto l2; goto l1; } catch(int) { // expected-note 4 {{jump bypasses initialization of catch block}} l3: goto l5; - goto l4; // expected-error {{goto into protected scope}} + goto l4; // expected-error {{cannot jump}} goto l3; - goto l2; // expected-error {{goto into protected scope}} + goto l2; // expected-error {{cannot jump}} goto l1; } catch(...) { // expected-note 4 {{jump bypasses initialization of catch block}} l4: goto l5; goto l4; - goto l3; // expected-error {{goto into protected scope}} - goto l2; // expected-error {{goto into protected scope}} + goto l3; // expected-error {{cannot jump}} + goto l2; // expected-error {{cannot jump}} goto l1; } l5: goto l5; - 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 l4; // expected-error {{cannot jump}} + goto l3; // expected-error {{cannot jump}} + goto l2; // expected-error {{cannot jump}} goto l1; } |