[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / for.cpp
blobe41383938934a8dc517a7213c86458a30c37ebc0
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 void f1() {
4 int n;
6 for (n = 0; n < 10; n++);
8 for (n = 0 n < 10; n++); // expected-error {{expected ';' in 'for'}}
9 for (n = 0; n < 10 n++); // expected-error {{expected ';' in 'for'}}
11 for (int n = 0 n < 10; n++); // expected-error {{expected ';' in 'for'}}
12 for (int n = 0; n < 10 n++); // expected-error {{expected ';' in 'for'}}
14 for (n = 0 bool b = n < 10; n++); // expected-error {{expected ';' in 'for'}}
15 for (n = 0; bool b = n < 10 n++); // expected-error {{expected ';' in 'for'}}
17 for (n = 0 n < 10 n++); // expected-error 2{{expected ';' in 'for'}}
19 for (;); // expected-error {{expected ';' in 'for'}}