[clang] [Clang] Implement P2747 constexpr placement new (PR #104586)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 21 07:09:33 PDT 2024
================
@@ -6691,7 +6691,7 @@ static bool HandleDestructionImpl(EvalInfo &Info, SourceRange CallRange,
if (Size && Size > Value.getArrayInitializedElts())
expandArray(Value, Value.getArraySize() - 1);
- for (; Size != 0; --Size) {
+ for (Size = Value.getArraySize(); Size != 0; --Size) {
----------------
cor3ntin wrote:
You can placement new int[1] into int[42] - and subsequently should not try to delete the remainder of the array
https://github.com/llvm/llvm-project/pull/104586
More information about the cfe-commits
mailing list