[clang] [clang][Interp] Support AddOffset with 128bit offsets (PR #68679)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 11 08:28:42 PDT 2023
================
@@ -1437,7 +1437,7 @@ bool OffsetHelper(InterpState &S, CodePtr OpPC, const T &Offset,
return false;
};
- unsigned MaxOffset = MaxIndex - Ptr.getIndex();
+ T MaxOffset = T::from(MaxIndex - Ptr.getIndex(), Offset.bitWidth());
----------------
AaronBallman wrote:
I think we should make the math operate on a `T` consistently, especially given that `Offset` and `Index` are already a `T`. The mixture of types is a bit of a code smell IMO.
https://github.com/llvm/llvm-project/pull/68679
More information about the cfe-commits
mailing list