[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 14:31:15 PDT 2023
rsmith added inline comments.
================
Comment at: clang/lib/AST/ExprConstant.cpp:9591-9594
+ bool IsMSConstexpr = Info.CurrentCall->CanEvalMSConstexpr &&
+ OperatorNew->hasAttr<MSConstexprAttr>();
if (OperatorNew->isReservedGlobalPlacementOperator() &&
+ (Info.CurrentCall->isStdFunction() || IsMSConstexpr) && !E->isArray()) {
----------------
Do we really need this change? Was our existing check of whether the caller is in namespace `std` not sufficient for MS' standard library? I'd strongly prefer not to have a documented, user-visible attribute that gives permission to use placement new directly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134475/new/
https://reviews.llvm.org/D134475
More information about the cfe-commits
mailing list