aboutsummaryrefslogtreecommitdiff
path: root/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
commitff1affef282d7146e14c8aa894eb5466a659398c (patch)
treef069b9a4d02406b51d1ecffa5df86ae75c9f4f70 /test/Driver/warning-options.cpp
parent87014f33f123461a012995b2f7eb5e6ecf6dc461 (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156937 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/warning-options.cpp')
-rw-r--r--test/Driver/warning-options.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Driver/warning-options.cpp b/test/Driver/warning-options.cpp
index a36210d7e1..1a2d51d528 100644
--- a/test/Driver/warning-options.cpp
+++ b/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'