]> granicus.if.org Git - clang/commitdiff
rearrange.
authorChris Lattner <sabre@nondot.org>
Sat, 18 Apr 2009 22:56:52 +0000 (22:56 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 18 Apr 2009 22:56:52 +0000 (22:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69490 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/scope-check.c

index 181b6c5aa493dfa0bee3bca8438be7b394434dc2..10316950fe9f8eeeb7b812603ea24c26e657ac68 100644 (file)
@@ -57,17 +57,21 @@ void test7(int x) {
 }
 
 int test8(int x) {
-  if (x) goto L;     // expected-error {{illegal goto into protected scope}}
+  // For statement.
   goto L2;     // expected-error {{illegal goto into protected scope}}
-  
   for (int arr[x];   // expected-note {{jump bypasses initialization of variable length array}}  
-       ; ++x) {
-    
+       ; ++x)
   L2:;
-  }
+
+  // Statement expressions.
+  goto L3;   // expected-error {{illegal goto into protected scope}}
+  int Y = ({  int a[x];   // expected-note {{jump bypasses initialization of variable length array}}  
+           L3: 4; });
   
+  // Statement expressions 2.
+  goto L1;     // expected-error {{illegal goto into protected scope}}
   return x == ({
                  int a[x];   // expected-note {{jump bypasses initialization of variable length array}}  
-               L:
+               L1:
                  42; });
 }