[clang] [clang][bytecode] Add `PtrView` for non-tracking pointers (PR #184129)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 19:47:02 PST 2026


================
@@ -776,10 +946,10 @@ class Pointer {
   /// The result is either a root pointer or something
   /// that isn't a base class anymore.
   [[nodiscard]] Pointer stripBaseCasts() const {
-    Pointer P = *this;
-    while (P.isBaseClass())
-      P = P.getBase();
-    return P;
+    PtrView V = view();
+    while (V.isBaseClass())
+      V = V.getBase();
+    return Pointer(V);
----------------
tbaederr wrote:

No, but it doesn't have to. It just moves up the chain.

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


More information about the cfe-commits mailing list