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
diff --git a/clang/test/Sema/scope-check.c b/clang/test/Sema/scope-check.c
index a9494d3..fa37d10 100644
--- a/clang/test/Sema/scope-check.c
+++ b/clang/test/Sema/scope-check.c
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -fsyntax-only -verify -fblocks -std=gnu99 %s -Wno-unreachable-code
 
 int test1(int x) {
-  goto L;    // expected-error{{goto into protected scope}}
+  goto L;    // expected-error{{cannot jump from this goto statement to its label}}
   int a[x];  // expected-note {{jump bypasses initialization of variable length array}}
   int b[x];  // expected-note {{jump bypasses initialization of variable length array}}
   L:
@@ -9,7 +9,7 @@
 }
 
 int test2(int x) {
-  goto L;            // expected-error{{goto into protected scope}}
+  goto L;            // expected-error{{cannot jump from this goto statement to its label}}
   typedef int a[x];  // expected-note {{jump bypasses initialization of VLA typedef}}
   L:
   return sizeof(a);
@@ -18,14 +18,14 @@
 void test3clean(int*);
 
 int test3() {
-  goto L;            // expected-error{{goto into protected scope}}
+  goto L;            // expected-error{{cannot jump from this goto statement to its label}}
 int a __attribute((cleanup(test3clean))); // expected-note {{jump bypasses initialization of variable with __attribute__((cleanup))}}
 L:
   return a;
 }
 
 int test4(int x) {
-  goto L;       // expected-error{{goto into protected scope}}
+  goto L;       // expected-error{{cannot jump from this goto statement to its label}}
 int a[x];       // expected-note {{jump bypasses initialization of variable length array}}
   test4(x);
 L:
@@ -50,7 +50,7 @@
   switch (x) {
   case 1: ;
     int a[x];       // expected-note {{jump bypasses initialization of variable length array}}
-  case 2:           // expected-error {{switch case is in protected scope}}
+  case 2:           // expected-error {{cannot jump from switch statement to this case label}}
     a[1] = 2;
     break;
   }
@@ -58,17 +58,17 @@
 
 int test8(int x) {
   // For statement.
-  goto L2;     // expected-error {{goto into protected scope}}
+  goto L2;     // expected-error {{cannot jump from this goto statement to its label}}
   for (int arr[x];   // expected-note {{jump bypasses initialization of variable length array}}  
        ; ++x)
     L2:;
 
   // Statement expressions.
-  goto L3;   // expected-error {{goto into protected scope}}
+  goto L3;   // expected-error {{cannot jump from this goto statement to its label}}
   int Y = ({  int a[x];   // expected-note {{jump bypasses initialization of variable length array}}  
            L3: 4; });
   
-  goto L4; // expected-error {{goto into protected scope}}
+  goto L4; // expected-error {{cannot jump from this goto statement to its label}}
   {
     int A[x],  // expected-note {{jump bypasses initialization of variable length array}}
         B[x];  // expected-note {{jump bypasses initialization of variable length array}}
@@ -91,7 +91,7 @@
     int A[x], B = ({ if (x)
                        goto L7;
                      else 
-                       goto L8;  // expected-error {{goto into protected scope}}
+                       goto L8;  // expected-error {{cannot jump from this goto statement to its label}}
                      4; }),
         C[x];   // expected-note {{jump bypasses initialization of variable length array}}
   L8:; // bad
@@ -103,7 +103,7 @@
                goto L9;
              else
                // FIXME:
-               goto L10;  // fixme-error {{goto into protected scope}}
+               goto L10;  // fixme-error {{cannot jump from this goto statement to its label}}
            4; })];
   L10:; // bad
   }
@@ -123,7 +123,7 @@
   }
   
   // Statement expressions 2.
-  goto L1;     // expected-error {{goto into protected scope}}
+  goto L1;     // expected-error {{cannot jump from this goto statement to its label}}
   return x == ({
                  int a[x];   // expected-note {{jump bypasses initialization of variable length array}}  
                L1:
@@ -133,7 +133,7 @@
 void test9(int n, void *P) {
   int Y;
   int Z = 4;
-  goto *P;  // expected-error {{indirect goto might cross protected scopes}}
+  goto *P;  // expected-error {{cannot jump from this indirect goto statement to one of its possible targets}}
 
 L2: ;
   int a[n]; // expected-note {{jump bypasses initialization of variable length array}}
@@ -151,14 +151,14 @@
 }
 
 void test10(int n, void *P) {
-  goto L0;     // expected-error {{goto into protected scope}}
+  goto L0;     // expected-error {{cannot jump from this goto statement to its label}}
   typedef int A[n];  // expected-note {{jump bypasses initialization of VLA typedef}}
 L0:
   
-  goto L1;      // expected-error {{goto into protected scope}}
+  goto L1;      // expected-error {{cannot jump from this goto statement to its label}}
   A b, c[10];        // expected-note 2 {{jump bypasses initialization of variable length array}}
 L1:
-  goto L2;     // expected-error {{goto into protected scope}}
+  goto L2;     // expected-error {{cannot jump from this goto statement to its label}}
   A d[n];      // expected-note {{jump bypasses initialization of variable length array}}
 L2:
   return;
@@ -171,7 +171,7 @@
     case 2: 
     case 3:;
       int Arr[n]; // expected-note {{jump bypasses initialization of variable length array}}
-    case 4:       // expected-error {{switch case is in protected scope}}
+    case 4:       // expected-error {{cannot jump from switch statement to this case label}}
       return;
     }
   };
@@ -185,7 +185,7 @@
   L1:
     goto L2;
   L2:
-    goto L3;    // expected-error {{goto into protected scope}}
+    goto L3;    // expected-error {{cannot jump from this goto statement to its label}}
     int Arr[n]; // expected-note {{jump bypasses initialization of variable length array}}
   L3:
     goto L4;
@@ -220,7 +220,7 @@
 void test15(int n, void *pc) {
   static const void *addrs[] = { &&L1, &&L2 };
 
-  goto *pc; // expected-error {{indirect goto might cross protected scope}}
+  goto *pc; // expected-error {{cannot jump from this indirect goto statement to one of its possible targets}}
 
  L1:
   {