You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
638 B

// RUN: %clang_cc1 -fsyntax-only -verify %s
// RUN: cp %s %t.cpp
// RUN: not %clang_cc1 -fsyntax-only %t.cpp -fixit
// RUN: %clang_cc1 -fsyntax-only %t.cpp
void test1(int a;) { // expected-error{{unexpected ';' before ')'}}
while (a > 5;) {} // expected-error{{unexpected ';' before ')'}}
for (int c = 0; c < 21; ++c;) {} // expected-error{{unexpected ';' before ')'}}
int d = int(3 + 4;); // expected-error{{unexpected ';' before ')'}}
int e[5;]; // expected-error{{unexpected ';' before ']'}}
e[a+1;] = 4; // expected-error{{unexpected ';' before ']'}}
int f[] = {1,2,3;}; // expected-error{{unexpected ';' before '}'}}
}