From: Hans Wennborg Date: Tue, 17 Sep 2013 23:27:39 +0000 (+0000) Subject: clang-cl: ignore ths /GS- flag X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=007ef4f775797665a2b2df2c693517ac3a275f5c;p=clang clang-cl: ignore ths /GS- flag The /GS- flag is used to turn off run-time buffer security checks (/GS). Since no such checks are enabled in the first place, I think we should just ignore this flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190900 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index 4dbb1ca5d0..1f73971a70 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -140,6 +140,7 @@ def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">; def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">; def _SLASH_errorReport : CLIgnoredJoined<"errorReport">; +def _SLASH_GS_ : CLIgnoredFlag<"GS-">; def _SLASH_nologo : CLIgnoredFlag<"nologo">; def _SLASH_Ob1 : CLIgnoredFlag<"Ob1">; def _SLASH_Ob2 : CLIgnoredFlag<"Ob2">; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index e9e3026e56..c3a90ced20 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -97,7 +97,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 /w12345 /wd1234 /RTC1 -- %s +// RUN: %clang_cl /Zs /WX /Zc:forScope /Zc:wchar_t /w12345 /wd1234 /RTC1 /GS- -- %s // Ignored options and compile-only options are ignored for link jobs. // RUN: touch %t.obj