1 // RUN: %clang_cc1 %s -verify -Wconversion
2
3 #define P(X) _Pragma(#X)
4 #define V(X) X
5
6 #define X \
7 P(clang diagnostic push) \
8 P(clang diagnostic ignored "-Wconversion") \
9 ) = 1.2; \
10 P(clang diagnostic pop)
11
f()12 void f() {
13 int a = 1.2; // expected-warning {{changes value}}
14
15 // Note, we intentionally enter a tentatively-parsed context here to trigger
16 // regular use of lookahead. This would go wrong if _Pragma checking in macro
17 // argument pre-expansion also tries to use token lookahead.
18 int (b
19 V(X)
20
21 int c = 1.2; // expected-warning {{changes value}}
22 }
23