brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · edc137e Raw
31 lines · c
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 diagnostic5 6// -Werror can map all warnings to error.7// RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error:"8 9// -Werror can map this one warning to error.10// RUN: not %clang_cc1 %s -Werror=extra-tokens 2>&1 | grep "error:"11 12// Mapping unrelated diags to errors doesn't affect this one.13// RUN: %clang_cc1 %s -Werror=trigraphs 2>&1 | grep "warning:"14 15// This should stay a warning with -pedantic.16// RUN: %clang_cc1 %s -pedantic 2>&1 | grep "warning:"17 18// This should emit an error with -pedantic-errors.19// RUN: not %clang_cc1 %s -pedantic-errors 2>&1 | grep "error:"20 21// This should emit a warning, because -Wfoo overrides -pedantic*.22// RUN: %clang_cc1 %s -pedantic-errors -Wextra-tokens 2>&1 | grep "warning:"23 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 diagnostic26 27#ifdef foo28#endif bad // extension!29 30int x;31