================
@@ -1567,10 +1554,17 @@ static bool interp__builtin_operator_new(InterpState
&S, CodePtr OpPC,
return true;
}
+ // Records. Still allocate them as single-element arrays.
+ QualType AllocType = S.getASTContext().getConstantArrayType(
+ ElemType, NumElems, nullptr, ArraySizeModifier::Normal, 0);
+
+ const Descriptor *Desc =
+ S.P.createDescriptor(NewCall, AllocType.getTypePtr(),
+ IsArray ? std::nullopt : Descriptor::InlineDescMD);
----------------
shafik wrote:
This `IsArray` check is outside the `if (IsArray)` block which has a return and
so this has to be `false`.
https://github.com/llvm/llvm-project/pull/146471
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits