ki.stfu created this revision. ki.stfu added a reviewer: rsmith. Herald added subscribers: cfe-commits, dang. Herald added a project: clang. ki.stfu requested review of this revision.
The first option tells the compiler to use external linkage for `constexpr` variables, and the second one prevents null checks after `operator new` which can throw. See https://docs.microsoft.com/en-us/cpp/build/reference/zc-externconstexpr and https://docs.microsoft.com/en-us/cpp/build/reference/zc-throwingnew-assume-operator-new-throws Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87372 Files: clang/include/clang/Driver/Options.td clang/test/Driver/cl-options.c Index: clang/test/Driver/cl-options.c =================================================================== --- clang/test/Driver/cl-options.c +++ clang/test/Driver/cl-options.c @@ -369,10 +369,12 @@ // RUN: /wd1234 \ // RUN: /Zc:__cplusplus \ // RUN: /Zc:auto \ +// RUN: /Zc:externConstexpr \ // RUN: /Zc:forScope \ // RUN: /Zc:inline \ // RUN: /Zc:rvalueCast \ // RUN: /Zc:ternary \ +// RUN: /Zc:throwingNew \ // RUN: /Zc:wchar_t \ // RUN: /ZH:MD5 \ // RUN: /ZH:SHA1 \ Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -4837,10 +4837,12 @@ def _SLASH_w : CLIgnoredJoined<"w">; def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">; def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">; +def _SLASH_Zc_externConstexpr : CLIgnoredFlag<"Zc:externConstexpr">; def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">; def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">; def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">; +def _SLASH_Zc_throwingNew : CLIgnoredFlag<"Zc:throwingNew">; def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">; def _SLASH_ZH_MD5 : CLIgnoredFlag<"ZH:MD5">; def _SLASH_ZH_SHA1 : CLIgnoredFlag<"ZH:SHA1">;
Index: clang/test/Driver/cl-options.c =================================================================== --- clang/test/Driver/cl-options.c +++ clang/test/Driver/cl-options.c @@ -369,10 +369,12 @@ // RUN: /wd1234 \ // RUN: /Zc:__cplusplus \ // RUN: /Zc:auto \ +// RUN: /Zc:externConstexpr \ // RUN: /Zc:forScope \ // RUN: /Zc:inline \ // RUN: /Zc:rvalueCast \ // RUN: /Zc:ternary \ +// RUN: /Zc:throwingNew \ // RUN: /Zc:wchar_t \ // RUN: /ZH:MD5 \ // RUN: /ZH:SHA1 \ Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -4837,10 +4837,12 @@ def _SLASH_w : CLIgnoredJoined<"w">; def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">; def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">; +def _SLASH_Zc_externConstexpr : CLIgnoredFlag<"Zc:externConstexpr">; def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">; def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">; def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">; def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">; +def _SLASH_Zc_throwingNew : CLIgnoredFlag<"Zc:throwingNew">; def _SLASH_Zc_wchar_t : CLIgnoredFlag<"Zc:wchar_t">; def _SLASH_ZH_MD5 : CLIgnoredFlag<"ZH:MD5">; def _SLASH_ZH_SHA1 : CLIgnoredFlag<"ZH:SHA1">;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits