Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Parser / extra-semi.cpp
blob7287f856d8c97361ff1145405a8c1d2d8128f0b8
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: cp %s %t.cpp
3 // RUN: not %clang_cc1 -fsyntax-only %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 '}'}}