1 // RUN: %clang_cc1 %s -E -Wdisabled-macro-expansion -verify
2 
3 #define p p
4 
5 #define a b
6 #define b a
7 
8 #define f(a) a
9 
10 #define g(b) a
11 
12 #define h(x) i(x)
13 #define i(y) i(y)
14 
15 #define c(x) x(0)
16 
17 #define y(x) y
18 #define z(x) (z)(x)
19 
20 p // no warning
21 
22 a // expected-warning {{recursive macro}}
23 
24 f(2)
25 
26 g(3) // expected-warning {{recursive macro}}
27 
28 h(0) // expected-warning {{recursive macro}}
29 
30 c(c) // expected-warning {{recursive macro}}
31 
32 y(5) // expected-warning {{recursive macro}}
33 
34 z(z) // ok
35 
36