]> granicus.if.org Git - clang/commitdiff
clang-cl: ignore ths /GS- flag
authorHans Wennborg <hans@hanshq.net>
Tue, 17 Sep 2013 23:27:39 +0000 (23:27 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 17 Sep 2013 23:27:39 +0000 (23:27 +0000)
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

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

index 4dbb1ca5d0d40b2e6bac38e4b82212c38dbdf165..1f73971a703e9d7d46a2574e014998b34baae911 100644 (file)
@@ -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">;
index e9e3026e56723e67b0ac0694de81ab9a56bb241c..c3a90ced20899af99e43ae4aee2eff01c19498cb 100644 (file)
@@ -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