xref: /aosp_15_r20/external/clang/test/Sema/for.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify %s
2*67e74705SXin Li 
3*67e74705SXin Li // Check C99 6.8.5p3
b1(void)4*67e74705SXin Li void b1 (void) { for (void (*f) (void);;); }
b2(void)5*67e74705SXin Li void b2 (void) { for (void f (void);;); }   // expected-error {{declaration of non-local variable}}
b3(void)6*67e74705SXin Li void b3 (void) { for (static int f;;); }    // expected-error {{declaration of non-local variable}}
b4(void)7*67e74705SXin Li void b4 (void) { for (typedef int f;;); }   // expected-error {{declaration of non-local variable}}
8