Add clang-cl alias to allow users to disable c4005

If we ever want three or more aliases, at that point we should put MSVC
warning ids in DiagnosticGroups.td.  We can use that to support #pragma
warning.

llvm-svn: 205598
This commit is contained in:
Reid Kleckner 2014-04-04 01:36:55 +00:00
parent 992fdc0785
commit 9307fba85d
2 changed files with 6 additions and 0 deletions

View File

@ -121,6 +121,8 @@ def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">,
def _SLASH_WX_ : CLFlag<"WX-">, HelpText<"Do not treat warnings as errors">,
Alias<W_Joined>, AliasArgs<["no-error"]>;
def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>;
def _SLASH_wd4005 : CLFlag<"wd4005">, Alias<W_Joined>,
AliasArgs<["no-macro-redefined"]>;
def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">,
Alias<vtordisp_mode_EQ>;
def _SLASH_Z7 : CLFlag<"Z7">, Alias<gline_tables_only>;

View File

@ -129,6 +129,10 @@
// WJoined: "-cc1"
// WJoined: "-Wunused-pragmas"
// For some warning ids, we can map from MSVC warning to Clang warning.
// RUN: %clang_cl -wd4005 -### -- %s 2>&1 | FileCheck -check-prefix=wd4005 %s
// wd4005: "-cc1"
// wd4005: "-Wno-macro-redefined"
// Ignored options. Check that we don't get "unused during compilation" errors.
// (/Zs is for syntax-only)