[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Misc / diag-mapping.c
blobedc137ec68fef78a39fd6fce9498235ce80ec3d1
1 // This should warn by default.
2 // RUN: %clang_cc1 %s 2>&1 | grep "warning:"
3 // This should not emit anything.
4 // RUN: %clang_cc1 %s -Wno-extra-tokens 2>&1 | not grep diagnostic
6 // -Werror can map all warnings to error.
7 // RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error:"
9 // -Werror can map this one warning to error.
10 // RUN: not %clang_cc1 %s -Werror=extra-tokens 2>&1 | grep "error:"
12 // Mapping unrelated diags to errors doesn't affect this one.
13 // RUN: %clang_cc1 %s -Werror=trigraphs 2>&1 | grep "warning:"
15 // This should stay a warning with -pedantic.
16 // RUN: %clang_cc1 %s -pedantic 2>&1 | grep "warning:"
18 // This should emit an error with -pedantic-errors.
19 // RUN: not %clang_cc1 %s -pedantic-errors 2>&1 | grep "error:"
21 // This should emit a warning, because -Wfoo overrides -pedantic*.
22 // RUN: %clang_cc1 %s -pedantic-errors -Wextra-tokens 2>&1 | grep "warning:"
24 // This should emit nothing, because -Wno-extra-tokens overrides -pedantic*
25 // RUN: %clang_cc1 %s -pedantic-errors -Wno-extra-tokens 2>&1 | not grep diagnostic
27 #ifdef foo
28 #endif bad // extension!
30 int x;