| // RUN: %clang_cc1 -fsyntax-only -verify -Wall -fblocks %s |
| void f(bool b1, bool b2) { |
| void f(bool b1, bool b2) { |
| end = 1; // expected-error{{assigning to 'double *' from incompatible type 'int'}} |
| goto end; // expected-error{{use of undeclared label 'end'}} |
| end: // expected-warning{{unused label 'end'}} |
| struct NonPOD { NonPOD(); ~NonPOD(); }; |
| goto undeclared; // expected-error{{use of undeclared label 'undeclared'}} |
| goto undeclared; // expected-error{{use of undeclared label 'undeclared'}} |
| goto done; // expected-error {{cannot jump}} |
| const S s2(s); // expected-note {{jump bypasses variable initialization}} |
| struct A { A(); A(const A&); ~A(); }; |
| void test(A a) { // expected-note {{jump enters lifetime of block}} FIXME: weird location |
| goto lbl; // expected-error {{cannot jump}} |