Author: Timm Bäder
Date: 2024-05-22T12:09:12+02:00
New Revision: 5d833c65da74d83a9b5df19da52d67ea1c0ecc10

URL: 
https://github.com/llvm/llvm-project/commit/5d833c65da74d83a9b5df19da52d67ea1c0ecc10
DIFF: 
https://github.com/llvm/llvm-project/commit/5d833c65da74d83a9b5df19da52d67ea1c0ecc10.diff

LOG: [clang][Interp][NFC] Remove unneeded CheckRange call

This doesn't do anything with the current tests and is unnecessary in
general.

Added: 
    

Modified: 
    clang/lib/AST/Interp/Interp.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/Interp.h b/clang/lib/AST/Interp/Interp.h
index bc2ca126ce364..c5607169b25f1 100644
--- a/clang/lib/AST/Interp/Interp.h
+++ b/clang/lib/AST/Interp/Interp.h
@@ -1538,9 +1538,6 @@ inline bool Memcpy(InterpState &S, CodePtr OpPC) {
 template <class T, ArithOp Op>
 bool OffsetHelper(InterpState &S, CodePtr OpPC, const T &Offset,
                   const Pointer &Ptr) {
-  if (!CheckRange(S, OpPC, Ptr, CSK_ArrayToPointer))
-    return false;
-
   // A zero offset does not change the pointer.
   if (Offset.isZero()) {
     S.Stk.push<Pointer>(Ptr);


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to