Skip to content

Commit 5d833c6

Browse files
committed
[clang][Interp][NFC] Remove unneeded CheckRange call
This doesn't do anything with the current tests and is unnecessary in general.
1 parent 0873b4c commit 5d833c6

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

clang/lib/AST/Interp/Interp.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,9 +1538,6 @@ inline bool Memcpy(InterpState &S, CodePtr OpPC) {
15381538
template <class T, ArithOp Op>
15391539
bool OffsetHelper(InterpState &S, CodePtr OpPC, const T &Offset,
15401540
const Pointer &Ptr) {
1541-
if (!CheckRange(S, OpPC, Ptr, CSK_ArrayToPointer))
1542-
return false;
1543-
15441541
// A zero offset does not change the pointer.
15451542
if (Offset.isZero()) {
15461543
S.Stk.push<Pointer>(Ptr);

0 commit comments

Comments
 (0)