From: David Majnemer Date: Thu, 14 May 2015 05:55:00 +0000 (+0000) Subject: [MS ABI] Add support for /Zc:sizedDealloc X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6777c07d096bbac5bf02413dbcbc72d470d4f32a;p=clang [MS ABI] Add support for /Zc:sizedDealloc git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237344 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/CLCompatOptions.td b/include/clang/Driver/CLCompatOptions.td index 08bda830c7..4726929e3a 100644 --- a/include/clang/Driver/CLCompatOptions.td +++ b/include/clang/Driver/CLCompatOptions.td @@ -139,6 +139,12 @@ def _SLASH_wd4996 : CLFlag<"wd4996">, Alias, AliasArgs<["no-deprecated-declarations"]>; def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">, Alias; +def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">, + HelpText<"Enable C++14 sized global deallocation functions">, + Alias; +def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">, + HelpText<"Disable C++14 sized global deallocation functions">, + Alias; def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">, HelpText<"Treat string literals as const">, Alias, AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>; diff --git a/test/Driver/cl-zc.cpp b/test/Driver/cl-zc.cpp index 639095fded..85eacffc02 100644 --- a/test/Driver/cl-zc.cpp +++ b/test/Driver/cl-zc.cpp @@ -15,6 +15,12 @@ // 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