llvm-capstone/clang/test/Frontend/warning-mapping-4.c
James Y Knight 3f8b916698 Fix the behavior of clang's -w flag.
It is intended to disable _all_ warnings, even those upgraded to
errors via `-Werror=warningname` or `#pragma clang diagnostic error'

Fixes: https://llvm.org/PR38231
Differential Revision: https://reviews.llvm.org/D53199

llvm-svn: 352535
2019-01-29 19:33:48 +00:00

12 lines
352 B
C

// Verify that various combinations of flags properly keep the sign-compare
// warning disabled.
// RUN: %clang_cc1 -verify -Wno-error=sign-compare %s
// RUN: %clang_cc1 -verify -Wsign-compare -w -Wno-error=sign-compare %s
// RUN: %clang_cc1 -verify -w -Werror=sign-compare %s
// expected-no-diagnostics
int f0(int x, unsigned y) {
return x < y;
}