================
@@ -10569,6 +10663,8 @@ static CharUnits getBaseAlignment(EvalInfo &Info, const
LValue &Value) {
return Info.Ctx.getDeclAlign(VD);
if (const auto *E = Value.Base.dyn_cast<const Expr *>())
return GetAlignOfExpr(Info.Ctx, E, UETT_AlignOf);
+ if (const auto &DA = Value.Base.dyn_cast<DynamicAllocLValue>())
+ return Info.Ctx.toCharUnitsFromBits(DA.getAlign());
----------------
keinflue wrote:
The size of the allocation becomes part of the base LValue:
https://github.com/keinflue/llvm-project/blob/2804eed24538abf9d80a7e63486eb0dfe8817e5a/clang/lib/AST/ExprConstant.cpp#L7890
https://github.com/llvm/llvm-project/pull/174549
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits