blob: 552d82362461e4fe9821501dc6ccc4468f7b163a [file] [log] [blame]
Douglas Gregor87c30072010-07-26 04:08:02 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Cedric Venet3d658642009-02-14 20:20:19 +00002
3void f() {
4 int a;
5 while (a) ;
6 while (int x) ; // expected-error {{expected '=' after declarator}}
7 while (float x = 0) ;
Douglas Gregor87c30072010-07-26 04:08:02 +00008 if (const int x = a) ; // expected-warning{{empty body}}
Cedric Venet3d658642009-02-14 20:20:19 +00009 switch (int x = a+10) {}
10 for (; int x = ++a; ) ;
11}