]> granicus.if.org Git - clang/commitdiff
clang-cl: Ignore the /wd n flag for disabling a warning
authorReid Kleckner <reid@kleckner.net>
Mon, 19 Aug 2013 23:57:44 +0000 (23:57 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 19 Aug 2013 23:57:44 +0000 (23:57 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188732 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/CLCompatOptions.td
test/Driver/cl-options.c

index b52e6625ad063353f7e72eb058db50f87b8fdc96..ed4c7e0f8c217f2044078d6243a0ae474b61e6ea 100644 (file)
@@ -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:
index 3eee6343f976a3ec206d8937ac2b2f60142fec06..85ae4cff458f7bf2dd7a54352a6717601800c313 100644 (file)
@@ -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.