From: Hans Wennborg Date: Fri, 14 Nov 2014 18:24:08 +0000 (+0000) Subject: clang-cl: Ignore the new /Zo[-] option (PR21571) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab2b75070182abe151b190eac2474b5b1156d6eb;p=clang clang-cl: Ignore the new /Zo[-] option (PR21571) Also fix the ignored options test which didn't fail properly on unknown options. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222013 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index 6e6388d92a..e05d68700e 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -197,6 +197,7 @@ def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">; // Ignored: def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">; +def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">; def _SLASH_errorReport : CLIgnoredJoined<"errorReport">; def _SLASH_FS : CLIgnoredFlag<"FS">, HelpText<"Force synchronous PDB writes">; def _SLASH_GF : CLIgnoredFlag<"GF">; @@ -214,6 +215,8 @@ def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">; def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">; def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">; def _SLASH_Zm : CLIgnoredJoined<"Zm">; +def _SLASH_Zo : CLIgnoredFlag<"Zo">; +def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">; // Unsupported: @@ -221,7 +224,6 @@ def _SLASH_Zm : CLIgnoredJoined<"Zm">; def _SLASH_AI : CLJoined<"AI">; def _SLASH_bigobj : CLFlag<"bigobj">; def _SLASH_clr : CLJoined<"clr">; -def _SLASH_d2Zi_PLUS : CLFlag<"d2Zi+">; def _SLASH_doc : CLJoined<"doc">; def _SLASH_FA_joined : CLJoined<"FA">; def _SLASH_favor : CLJoined<"favor">; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index 4494ca7664..44242c8c9c 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -172,6 +172,7 @@ // (/Zs is for syntax-only) // RUN: %clang_cl /Zs \ // RUN: /analyze- \ +// RUN: /d2Zi+ \ // RUN: /errorReport:foo \ // RUN: /FS \ // RUN: /GF \ @@ -190,8 +191,11 @@ // RUN: /Zc:wchar_t \ // RUN: /Zc:inline \ // RUN: /Zc:rvalueCast \ +// RUN: /Zo \ +// RUN: /Zo- \ // RUN: -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s // IGNORED-NOT: argument unused during compilation +// IGNORED-NOT: no such file or directory // Ignored options and compile-only options are ignored for link jobs. // RUN: touch %t.obj @@ -210,7 +214,6 @@ // RUN: /AIfoo \ // RUN: /clr:pure \ // RUN: /docname \ -// RUN: /d2Zi+ \ // RUN: /EHsc \ // RUN: /F \ // RUN: /FA \