summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/warning-options.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-05-16 19:28:02 +0000
committerChad Rosier <mcrosier@apple.com>2012-05-16 19:28:02 +0000
commit286852a10c58ead95ddcd66a08680d0bb2a40666 (patch)
tree83b89d93a48d314f7bcc87119ed3cf311000be0e /clang/test/Driver/warning-options.cpp
parenta32a0959202b223233960ccc3f9e975d29e79580 (diff)
downloadbcm5719-llvm-286852a10c58ead95ddcd66a08680d0bb2a40666.tar.gz
bcm5719-llvm-286852a10c58ead95ddcd66a08680d0bb2a40666.zip
Warn about -Wno-foo where foo is an unknown warning option. This is helpful
for subtle misspellings such as -Wno-unused-command-line-arguments instead of -Wno-unused-command-line-argument. Also fix the diagnostic messages to properly handle -Wno- options. Previously, the positive version was always emitted (i.e., -Wfoo was emitted for -Wno-foo). rdar://11461500 llvm-svn: 156937
Diffstat (limited to 'clang/test/Driver/warning-options.cpp')
-rw-r--r--clang/test/Driver/warning-options.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Driver/warning-options.cpp b/clang/test/Driver/warning-options.cpp
index a36210d7e1b..1a2d51d528c 100644
--- a/clang/test/Driver/warning-options.cpp
+++ b/clang/test/Driver/warning-options.cpp
@@ -2,3 +2,9 @@
// LARGE_VALUE_COPY_DEFAULT: -Wlarge-by-value-copy=64
// RUN: %clang -### -Wlarge-by-value-copy=128 %s 2>&1 | FileCheck -check-prefix=LARGE_VALUE_COPY_JOINED %s
// LARGE_VALUE_COPY_JOINED: -Wlarge-by-value-copy=128
+
+// RUN: %clang -c -Wmonkey -Wno-monkey -Wno-unused-command-line-arguments \
+// RUN: -Wno-unused-command-line-argument %s 2>&1 | FileCheck %s
+// CHECK: unknown warning option '-Wmonkey'
+// CHECK: unknown warning option '-Wno-monkey'
+// CHECK: unknown warning option '-Wno-unused-command-line-arguments'
OpenPOWER on IntegriCloud