llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

block() requires the pointer to be a block pointer.

---
Full diff: https://github.com/llvm/llvm-project/pull/119552.diff


1 Files Affected:

- (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+1-1) 


``````````diff
diff --git a/clang/lib/AST/ByteCode/InterpBuiltin.cpp 
b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
index 4fe17ec01906e9..57175da32b31cd 100644
--- a/clang/lib/AST/ByteCode/InterpBuiltin.cpp
+++ b/clang/lib/AST/ByteCode/InterpBuiltin.cpp
@@ -1876,7 +1876,7 @@ static bool interp__builtin_memcpy(InterpState &S, 
CodePtr OpPC,
   }
 
   // Check for overlapping memory regions.
-  if (!Move && SrcPtr.block() == DestPtr.block()) {
+  if (!Move && Pointer::pointToSameBlock(SrcPtr, DestPtr)) {
     unsigned SrcIndex = SrcPtr.getIndex() * SrcPtr.elemSize();
     unsigned DstIndex = DestPtr.getIndex() * DestPtr.elemSize();
     unsigned N = Size.getZExtValue();

``````````

</details>


https://github.com/llvm/llvm-project/pull/119552
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to