[clang] [clang] Follow-up fixes for offsetof unsigned index change (PR #207808)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 7 17:48:40 PDT 2026
================
@@ -6824,7 +6824,7 @@ bool InterpretOffsetOf(InterpState &S, CodePtr OpPC, const OffsetOfExpr *E,
CurrentType = AT->getElementType();
CharUnits ElementSize = S.getASTContext().getTypeSizeInChars(CurrentType);
int64_t ElemSize = ElementSize.getQuantity();
- if (Index != 0 && ElemSize > llvm::maxIntN(64) / Index) {
+ if ((Index != 0) && (ElemSize > (llvm::maxIntN(64) / Index))) {
----------------
shafik wrote:
I meant just around the second half of the expression b/c of the mix of `>` and `/`
https://github.com/llvm/llvm-project/pull/207808
More information about the cfe-commits
mailing list