[clang] [clang][bytecode][NFC] Make string pointer check more explicit (PR #233360)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 19 00:38:52 PDT 2026
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/233360
We already handled block pointers above, so the isReadablePointerType() check here is equivalent to isStringPointer().
>From c6b93e59e54f1da4fa1fc563cf966d8155ab1638 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Mon, 19 Oct 2026 09:36:30 +0200
Subject: [PATCH] [clang][bytecode][NFC] Make string pointer check more
explicit
We already handled block pointers above, so the isReadablePointerType()
check here is equivalent to isStringPointer().
---
clang/lib/AST/ByteCode/Interp.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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());
More information about the cfe-commits
mailing list