r189882 - clang-cl: Make -W a core option so we can adjust clang warnings.
Reid Kleckner
reid at kleckner.net
Tue Sep 3 16:18:43 PDT 2013
Author: rnk
Date: Tue Sep 3 18:18:43 2013
New Revision: 189882
URL: http://llvm.org/viewvc/llvm-project?rev=189882&view=rev
Log:
clang-cl: Make -W a core option so we can adjust clang warnings.
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/test/Driver/cl-options.c
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=189882&r1=189881&r2=189882&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Tue Sep 3 18:18:43 2013
@@ -250,7 +250,7 @@ def Wp_COMMA : CommaJoined<["-"], "Wp,">
MetaVarName<"<arg>">;
def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option]>;
def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option]>;
-def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option]>,
+def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption]>,
MetaVarName<"<warning>">, HelpText<"Enable the specified warning">;
def Xanalyzer : Separate<["-"], "Xanalyzer">,
HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">;
Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=189882&r1=189881&r2=189882&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Tue Sep 3 18:18:43 2013
@@ -88,6 +88,10 @@
// RUN: %clang_cl /Zs -### -- %s 2>&1 | FileCheck -check-prefix=Zs %s
// Zs: -fsyntax-only
+// We forward any unrecognized -W diagnostic options to cc1.
+// RUN: %clang_cl -Wunused-pragmas -### -- %s 2>&1 | FileCheck -check-prefix=WJoined %s
+// WJoined: "-cc1"
+// WJoined: "-Wunused-pragmas"
// Ignored options. Check that we don't get "unused during compilation" errors.
// (/Zs is for syntax-only, /WX is for -Werror)
More information about the cfe-commits
mailing list