r188732 - clang-cl: Ignore the /wd n flag for disabling a warning
Reid Kleckner
reid at kleckner.net
Mon Aug 19 16:57:44 PDT 2013
Author: rnk
Date: Mon Aug 19 18:57:44 2013
New Revision: 188732
URL: http://llvm.org/viewvc/llvm-project?rev=188732&view=rev
Log:
clang-cl: Ignore the /wd n flag for disabling a warning
Clang doesn't have a table mapping cl.exe to clang warnings. While some
warnings like -Wsign-compare exist in both compilers, the majority do
not correspond and should usually be ignored.
Modified:
cfe/trunk/include/clang/Driver/CLCompatOptions.td
cfe/trunk/test/Driver/cl-options.c
Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CLCompatOptions.td?rev=188732&r1=188731&r2=188732&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CLCompatOptions.td (original)
+++ cfe/trunk/include/clang/Driver/CLCompatOptions.td Mon Aug 19 18:57:44 2013
@@ -124,6 +124,7 @@ def _SLASH_Ob1 : CLIgnoredFlag<"Ob1">;
def _SLASH_Ob2 : CLIgnoredFlag<"Ob2">;
def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;
def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">;
+def _SLASH_wd : CLIgnoredJoined<"wd">;
// Unsupported:
Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=188732&r1=188731&r2=188732&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Mon Aug 19 18:57:44 2013
@@ -94,7 +94,7 @@
// Ignored options. Check that we don't get "unused during compilation" errors.
// (/Zs is for syntax-only, /WX is for -Werror)
// RUN: %clang_cl /Zs /WX /analyze- /errorReport:foo /nologo /Ob1 /Ob2 -- %s
-// RUN: %clang_cl /Zs /WX /Zc:forScope /Zc:wchar_t -- %s
+// RUN: %clang_cl /Zs /WX /Zc:forScope /Zc:wchar_t /wd1234 -- %s
// Unsupported but parsed options. Check that we don't error on them.
More information about the cfe-commits
mailing list