blob: af1e62f6b1b61c2696c207e71aa92f8378f75de8 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Anders Carlsson2d85f8b2007-10-10 20:50:11 +00002
3void f1(int a) {
4 if (a); // expected-warning {{if statement has empty body}}
5}
6
7void f2(int a) {
8 if (a) {}
9}
Chris Lattnerb96728d2007-10-29 05:08:52 +000010
11void f3() {
12 if (1)
13 xx; // expected-error {{use of undeclared identifier}}
14 return; // no empty body warning.
15}
16