[clang] [clang][bytecode] Add `StringPointer` (PR #216736)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 22:52:24 PDT 2026


================
@@ -324,14 +348,34 @@ std::optional<uint64_t> Context::evaluateStrlen(State &Parent, const Expr *E) {
   std::optional<uint64_t> Result;
   auto PtrRes = C.interpretAsPointer(E, [&](InterpState &S, CodePtr OpPC,
                                             const Pointer &Ptr) {
-    if (!Ptr.isBlockPointer())
+    if (!Ptr.isReadablePointerType())
+      return false;
+
+    if (Ptr.isPastEnd())
       return false;
 
+    if (Ptr.isStringPointer()) {
+
----------------
tbaederr wrote:

What's the typo?

https://github.com/llvm/llvm-project/pull/216736


More information about the cfe-commits mailing list