[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / extra-semi.cpp
blobc08756149ef7c09f27cfb5f63e46f4ca6cd9b077
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: cp %s %t.cpp
3 // RUN: not %clang_cc1 %t.cpp -fixit
4 // RUN: %clang_cc1 -fsyntax-only %t.cpp
6 void test1(int a;) { // expected-error{{unexpected ';' before ')'}}
7 while (a > 5;) {} // expected-error{{unexpected ';' before ')'}}
8 for (int c = 0; c < 21; ++c;) {} // expected-error{{unexpected ';' before ')'}}
9 int d = int(3 + 4;); // expected-error{{unexpected ';' before ')'}}
10 int e[5;]; // expected-error{{unexpected ';' before ']'}}
11 e[a+1;] = 4; // expected-error{{unexpected ';' before ']'}}
12 int f[] = {1,2,3;}; // expected-error{{unexpected ';' before '}'}}