1 // RUN: %clang_cc1 %s -verify -Wconversion
4 #define A(desc) _Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \"-Wparentheses\"") _Pragma("clang diagnostic pop")
5 #define B(desc) A(desc)
6 B(_Pragma("clang diagnostic ignored \"-Wparentheses\""))
10 #define INACTIVE(x) EMPTY(x)
13 #define ACTIVE(x) ID(x)
15 // This should be ignored..
16 INACTIVE(_Pragma("clang diagnostic ignored \"-Wconversion\""))
18 #define IGNORE_CONV _Pragma("clang diagnostic ignored \"-Wconversion\"") _Pragma("clang diagnostic ignored \"-Wconversion\"")
23 #define IGNORE_POPPUSH(Pop, Push, W, D) Push W D Pop
24 IGNORE_POPPUSH(_Pragma("clang diagnostic pop"), _Pragma("clang diagnostic push"),
25 _Pragma("clang diagnostic ignored \"-Wconversion\""), int q
= (double)1.0);
27 int x1
= (double)1.0; // expected-warning {{implicit conversion}}
29 ACTIVE(_Pragma
) ("clang diagnostic ignored \"-Wconversion\"")) // expected-error {{_Pragma takes a parenthesized string literal}} \
30 expected
-error
{{expected identifier
or '('}} expected
-error
{{expected
')'}} expected
-note
{{to match
this '('}}
32 // This should disable the warning.