llvm-project
14 строк · 436.0 Байт
1// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3int f(int x) {4if (int foo = f(bar)) {} // expected-error{{use of undeclared identifier 'bar'}}5while (int foo = f(bar)) {} // expected-error{{use of undeclared identifier 'bar'}}6for (int foo = f(bar);;) {} // expected-error{{use of undeclared identifier 'bar'}}7
8int bar;9if (int foo = f(bar)) {}10while (int foo = f(bar)) {}11for (int foo = f(bar);;) {}12
13return 0;14}
15
16