From 9b803cd682efb9c146a02b3a1ed5b7dd80e6b216 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 19 Aug 2013 23:57:44 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188732 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/CLCompatOptions.td | 1 + test/Driver/cl-options.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index b52e6625ad..ed4c7e0f8c 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -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: diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index 3eee6343f9..85ae4cff45 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -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. -- 2.40.0