[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Preprocessor / _Pragma-in-macro-arg.cpp
blob0d2dcd05124fdc5284fadff9f364a127c7d6659d
1 // RUN: %clang_cc1 %s -verify -Wconversion
3 #define P(X) _Pragma(#X)
4 #define V(X) X
6 #define X \
7 P(clang diagnostic push) \
8 P(clang diagnostic ignored "-Wconversion") \
9 ) = 1.2; \
10 P(clang diagnostic pop)
12 void f() {
13 int a = 1.2; // expected-warning {{changes value}}
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)
21 int c = 1.2; // expected-warning {{changes value}}