llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) <details> <summary>Changes</summary> We already do this later in OffsetHelper. --- Full diff: https://github.com/llvm/llvm-project/pull/215469.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.h (-10) ``````````diff diff --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h index 4c8d11a9dd77a..054fba2c87c45 100644 --- a/clang/lib/AST/ByteCode/Interp.h +++ b/clang/lib/AST/ByteCode/Interp.h @@ -3457,11 +3457,6 @@ inline bool ArrayElemPtr(InterpState &S, CodePtr OpPC) { const T &Offset = S.Stk.pop<T>(); const Pointer &Ptr = S.Stk.peek<Pointer>(); - if (!Ptr.isZero() && !Offset.isZero()) { - if (!CheckArray(S, OpPC, Ptr)) - return false; - } - if (Offset.isZero()) { if (const Descriptor *Desc = Ptr.getFieldDesc(); Desc && Desc->isArray() && Ptr.getIndex() == 0) { @@ -3488,11 +3483,6 @@ inline bool ArrayElemPtrPop(InterpState &S, CodePtr OpPC) { const T &Offset = S.Stk.pop<T>(); const Pointer &Ptr = S.Stk.pop<Pointer>(); - if (!Ptr.isZero() && !Offset.isZero()) { - if (!CheckArray(S, OpPC, Ptr)) - return false; - } - if (Offset.isZero()) { if (const Descriptor *Desc = Ptr.getFieldDesc(); Desc && Desc->isArray() && Ptr.getIndex() == 0) { `````````` </details> https://github.com/llvm/llvm-project/pull/215469 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
