mirror of
https://github.com/opnsense/src.git
synced 2026-02-28 04:10:49 -05:00
16 lines
290 B
C
16 lines
290 B
C
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
void f1(int a) {
|
|
if (a); // expected-warning {{if statement has empty body}}
|
|
}
|
|
|
|
void f2(int a) {
|
|
if (a) {}
|
|
}
|
|
|
|
void f3() {
|
|
if (1)
|
|
xx; // expected-error {{use of undeclared identifier}}
|
|
return; // no empty body warning.
|
|
}
|
|
|