diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-16 04:32:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-16 04:32:54 +0000 |
commit | f9150bac01dbfb3e399a1e115a66a325683e059c (patch) | |
tree | 055faa79b183e95511d27b630f1ce935fce9f95d /clang/test/Misc | |
parent | 411c0ffe5d96f5e2e5609ad643f81bd2c7fe5d45 (diff) | |
download | bcm5719-llvm-f9150bac01dbfb3e399a1e115a66a325683e059c.tar.gz bcm5719-llvm-f9150bac01dbfb3e399a1e115a66a325683e059c.zip |
arrange for -Wno-error=foo warnings to be immune to -Werror as
they are supposed to be.
llvm-svn: 69265
Diffstat (limited to 'clang/test/Misc')
-rw-r--r-- | clang/test/Misc/diag-mapping2.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/Misc/diag-mapping2.c b/clang/test/Misc/diag-mapping2.c new file mode 100644 index 00000000000..7e0d7742a9f --- /dev/null +++ b/clang/test/Misc/diag-mapping2.c @@ -0,0 +1,19 @@ +// This should warn by default. +// RUN: clang-cc %s 2>&1 | grep "warning:" && + +// This should not emit anything. +// RUN: clang-cc %s -w 2>&1 | not grep diagnostic && +// RUN: clang-cc %s -Wno-#warnings 2>&1 | not grep diagnostic && + +// -Werror can map all warnings to error. +// RUN: clang-cc %s -Werror 2>&1 | grep "error:" && + +// -Werror can map this one warning to error. +// RUN: clang-cc %s -Werror=#warnings 2>&1 | grep "error:" && + +// -Wno-error= overrides -Werror. rdar://3158301 +// RUN: clang-cc %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:" + +#warning foo + + |