llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

We already handled block pointers above, so the isReadablePointerType() check 
here is equivalent to isStringPointer().

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


1 Files Affected:

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


``````````diff
diff --git a/clang/lib/AST/ByteCode/Interp.cpp 
b/clang/lib/AST/ByteCode/Interp.cpp
index c5cc90f5fdd7f..b3ecbe9b898e8 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -1024,7 +1024,7 @@ bool CheckLoad(InterpState &S, CodePtr OpPC, const 
Pointer &Ptr,
   }
 
   // Block and string pointers are the only ones we can actually read from.
-  if (!Ptr.isReadablePointerType())
+  if (!Ptr.isStringPointer())
     return diagnoseDummy(S, OpPC, Ptr, AK);
 
   assert(Ptr.isStringPointer());

``````````

</details>


https://github.com/llvm/llvm-project/pull/233360
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to