1 // RUN: %clang_cc1 -fsyntax-only -verify %s -Wno-unreachable-code
8 if (0) { if (1) {} } else { }
12 while (0) while(0) do ; while(0);
14 for ((void)0;0;(void)0)
16 for ((void)9;0;(void)2)
18 for (int X
= 0; 0; (void)0);
34 if (0); // expected-warning {{if statement has empty body}} expected-note {{put the semicolon on a separate line to silence this warning}}
36 int X
; // declaration in a block.
38 foo
: if (0); // expected-warning {{if statement has empty body}} expected-note {{put the semicolon on a separate line to silence this warning}}
43 if (0); // expected-warning {{if statement has empty body}} expected-note {{put the semicolon on a separate line to silence this warning}}
47 if (0); // expected-warning {{if statement has empty body}} expected-note {{put the semicolon on a separate line to silence this warning}}
53 . // expected-error {{expected expression}}
58 return 4 // expected-error {{expected ';' after return statement}}
62 // Should not skip '}' and produce a "expected '}'" error.
63 undecl
// expected-error {{use of undeclared identifier 'undecl'}}
70 X
= 0, // expected-error {{expected ';' after expression}}
74 X
= 0, // expected-error {{expected ';' after expression}}
78 return 4, // expected-error {{expected ';' after return statement}}