2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -fsyntax-only -verify %s
|
2007-10-11 04:50:11 +08:00
|
|
|
|
|
|
|
void f1(int a) {
|
|
|
|
if (a); // expected-warning {{if statement has empty body}}
|
|
|
|
}
|
|
|
|
|
|
|
|
void f2(int a) {
|
|
|
|
if (a) {}
|
|
|
|
}
|
2007-10-29 13:08:52 +08:00
|
|
|
|
|
|
|
void f3() {
|
|
|
|
if (1)
|
|
|
|
xx; // expected-error {{use of undeclared identifier}}
|
|
|
|
return; // no empty body warning.
|
|
|
|
}
|
|
|
|
|