[clang] [Clang][CodeGen] Preserve alignment information for pointer arithmetics (PR #152575)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 7 13:20:33 PDT 2025
================
@@ -1381,6 +1432,13 @@ static Address EmitPointerWithAlignment(const Expr *E, LValueBaseInfo *BaseInfo,
if (CE->getCastKind() == CK_AddressSpaceConversion)
Addr = CGF.Builder.CreateAddrSpaceCast(
Addr, CGF.ConvertType(E->getType()), ElemTy);
+ // Note: Workaround for PR114062. See also the special handling in
----------------
efriedma-quic wrote:
Inserting random casts is how we get into trouble like this in the first place...
https://github.com/llvm/llvm-project/pull/152575
More information about the cfe-commits
mailing list