[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Preprocessor / expr_liveness.c
blobc3b64210bb498913a6d9861a4a626acce5b3f271
1 /* RUN: %clang_cc1 -E %s -DNO_ERRORS -Werror -Wundef
2 RUN: not %clang_cc1 -E %s
3 */
5 #ifdef NO_ERRORS
6 /* None of these divisions by zero are in live parts of the expression, do not
7 emit any diagnostics. */
9 #define MACRO_0 0
10 #define MACRO_1 1
12 #if MACRO_0 && 10 / MACRO_0
13 foo
14 #endif
16 #if MACRO_1 || 10 / MACRO_0
17 bar
18 #endif
20 #if 0 ? 124/0 : 42
21 #endif
23 // PR2279
24 #if 0 ? 1/0: 2
25 #else
26 #error
27 #endif
29 // PR2279
30 #if 1 ? 2 ? 3 : 4 : 5
31 #endif
33 // PR2284
34 #if 1 ? 0: 1 ? 1/0: 1/0
35 #endif
37 #else
40 /* The 1/0 is live, it should error out. */
41 #if 0 && 1 ? 4 : 1 / 0
42 baz
43 #endif
46 #endif
48 // rdar://6505352
49 // -Wundef should not warn about use of undefined identifier if not live.
50 #if (!defined(XXX) || XXX > 42)
51 #endif