]> granicus.if.org Git - clang/commitdiff
[MS ABI] Add support for /Zc:sizedDealloc
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 14 May 2015 05:55:00 +0000 (05:55 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 14 May 2015 05:55:00 +0000 (05:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237344 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/CLCompatOptions.td
test/Driver/cl-zc.cpp

index 08bda830c7887493d2b4353753bee26750b0c7de..4726929e3ae8d0a3d53ffc10740a2d208bdba279 100644 (file)
@@ -139,6 +139,12 @@ def _SLASH_wd4996 : CLFlag<"wd4996">, Alias<W_Joined>,
   AliasArgs<["no-deprecated-declarations"]>;
 def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">,
   Alias<vtordisp_mode_EQ>;
+def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">,
+  HelpText<"Enable C++14 sized global deallocation functions">,
+  Alias<fsized_deallocation>;
+def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">,
+  HelpText<"Disable C++14 sized global deallocation functions">,
+  Alias<fno_sized_deallocation>;
 def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">,
   HelpText<"Treat string literals as const">, Alias<W_Joined>,
   AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>;
index 639095fded809565f738a4934c052e9d99b8c5fc..85eacffc02a996ec2b110e65ce461e3b88ed2423 100644 (file)
 // RUN: %clang_cl /c -### /Zc:trigraphs- -- %s 2>&1 | FileCheck -check-prefix=TRIGRAPHS-OFF %s
 // TRIGRAPHS-OFF: "-fno-trigraphs"
 
+// RUN: %clang_cl /c -### /Zc:sizedDealloc -- %s 2>&1 | FileCheck -check-prefix=SIZED-DEALLOC-ON %s
+// SIZED-DEALLOC-ON: "-fsized-deallocation"
+
+// RUN: %clang_cl /c -### /Zc:sizedDealloc- -- %s 2>&1 | FileCheck -check-prefix=SIZED-DEALLOC-OFF %s
+// SIZED-DEALLOC-OFF-NOT: "-fsized-deallocation"
+
 // RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=STRICTSTRINGS-DEFAULT %s
 // STRICTSTRINGS-DEFAULT-NOT: -Werror=c++11-compat-deprecated-writable-strings
 // RUN: %clang_cl /c -### /Zc:strictStrings -- %s 2>&1 | FileCheck -check-prefix=STRICTSTRINGS-ON %s