clang-cl: Make -W a core option so we can adjust clang warnings.

llvm-svn: 189882
This commit is contained in:
Reid Kleckner 2013-09-03 23:18:43 +00:00
parent 225f090bdb
commit f3ad720130
2 changed files with 5 additions and 1 deletions

View File

@ -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>">;

View File

@ -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)