Added testcases for -Wdisabled-macro-expansion.

llvm-svn: 147473
This commit is contained in:
Abramo Bagnara 2012-01-03 20:13:03 +00:00
parent fcc041eabf
commit 9f3d1ac419
1 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,27 @@
// RUN: %clang_cc1 %s -E -Wdisabled-macro-expansion -verify
#define p p
#define a b
#define b a
#define f(a) a
#define g(b) a
#define h(x) i(x)
#define i(y) i(y)
#define c(x) x(0)
p // expected-warning {{recursive macro}}
a // expected-warning {{recursive macro}}
f(2)
g(3) // expected-warning {{recursive macro}}
h(0) // expected-warning {{recursive macro}}
c(c) // expected-warning {{recursive macro}}