diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-05-27 15:17:06 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-05-27 15:17:06 +0000 |
commit | 53992adde3eda3ccf9da63bc7e45673f043de18f (patch) | |
tree | 3558f327a6f9ab59c5d7a06528d84e1560445247 /test/Sema/scope-check.c | |
parent | 7e411337c0ed226dace6e07f1420486768161308 (diff) | |
download | FreeBSD-src-53992adde3eda3ccf9da63bc7e45673f043de18f.zip FreeBSD-src-53992adde3eda3ccf9da63bc7e45673f043de18f.tar.gz |
Update clang to r104832.
Diffstat (limited to 'test/Sema/scope-check.c')
-rw-r--r-- | test/Sema/scope-check.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/test/Sema/scope-check.c b/test/Sema/scope-check.c index 6f86402..f3881ed 100644 --- a/test/Sema/scope-check.c +++ b/test/Sema/scope-check.c @@ -19,7 +19,7 @@ void test3clean(int*); int test3() { goto L; // expected-error{{illegal goto into protected scope}} -int a __attribute((cleanup(test3clean))); // expected-note {{jump bypasses initialization of declaration with __attribute__((cleanup))}} +int a __attribute((cleanup(test3clean))); // expected-note {{jump bypasses initialization of variable with __attribute__((cleanup))}} L: return a; } @@ -133,20 +133,20 @@ int test8(int x) { void test9(int n, void *P) { int Y; int Z = 4; - goto *P; // ok. + goto *P; // expected-warning {{indirect goto might cross protected scopes}} L2: ; - int a[n]; // expected-note 2 {{jump bypasses initialization of variable length array}} + int a[n]; // expected-note {{jump bypasses initialization of variable length array}} -L3: +L3: // expected-note {{possible target of indirect goto}} L4: - goto *P; // expected-warning {{illegal indirect goto in protected scope, unknown effect on scopes}} + goto *P; goto L3; // ok goto L4; // ok void *Ptrs[] = { - &&L2, // Ok. - &&L3 // expected-warning {{address taken of label in protected scope, jump to it would have unknown effect on scope}} + &&L2, + &&L3 }; } @@ -193,3 +193,9 @@ void test12(int n) { }; } +void test13(int n, void *p) { + int vla[n]; + goto *p; + a0: ; + static void *ps[] = { &&a0 }; +} |