From 7949acf370bd3f1f47c15f29ecaa28b8797a9c1f Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Tue, 8 Oct 2013 16:56:54 +0000 Subject: [PATCH] clang-cl: ignore the /sdl[-] flag In cl.exe, this flag turns some warnings into errors and adds some codegen security checks. I don't think we intend to support this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192201 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/CLCompatOptions.td | 2 ++ test/Driver/cl-options.c | 1 + 2 files changed, 3 insertions(+) diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index 26ca90e31a..1d5bdb0f85 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -152,6 +152,8 @@ def _SLASH_nologo : CLIgnoredFlag<"nologo">; def _SLASH_Ob1 : CLIgnoredFlag<"Ob1">; def _SLASH_Ob2 : CLIgnoredFlag<"Ob2">; def _SLASH_RTC : CLIgnoredJoined<"RTC">; +def _SLASH_sdl : CLIgnoredFlag<"sdl">; +def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">; def _SLASH_vmg : CLIgnoredFlag<"vmg">; def _SLASH_w : CLIgnoredJoined<"w">; def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index e9e18582e3..16efae4e92 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -101,6 +101,7 @@ // (/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 /w12345 /wd1234 /RTC1 /GS- -- %s +// RUN: %clang_cl /Zs /WX /sdl /sdl- -- %s // Ignored options and compile-only options are ignored for link jobs. // RUN: touch %t.obj -- 2.40.0