1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify %s 2*67e74705SXin Li f(int x)3*67e74705SXin Liint f(int x) { 4*67e74705SXin Li if (int foo = f(bar)) {} // expected-error{{use of undeclared identifier 'bar'}} 5*67e74705SXin Li while (int foo = f(bar)) {} // expected-error{{use of undeclared identifier 'bar'}} 6*67e74705SXin Li for (int foo = f(bar);;) {} // expected-error{{use of undeclared identifier 'bar'}} 7*67e74705SXin Li 8*67e74705SXin Li int bar; 9*67e74705SXin Li if (int foo = f(bar)) {} 10*67e74705SXin Li while (int foo = f(bar)) {} 11*67e74705SXin Li for (int foo = f(bar);;) {} 12*67e74705SXin Li 13*67e74705SXin Li return 0; 14*67e74705SXin Li } 15*67e74705SXin Li 16