[clang] [LifetimeSafety] Implement multi-level origins (PR #168344)

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 9 10:03:06 PST 2025


================
@@ -52,41 +62,118 @@ struct Origin {
   }
 };
 
-/// Manages the creation, storage, and retrieval of origins for pointer-like
-/// variables and expressions.
-class OriginManager {
+/// A list of origins representing levels of indirection for pointer-like types.
----------------
ymand wrote:

In that case, I would recommend you consider whether this new design could effectively support template cases. That is, you don't have support them with this change, but you should be relatively sure it will work for them in the future. My intuition is that a vector is still the right structure, because that's exactly what we use for Nullability. The vector represents the pre-order traversal of the type tree, with each element representing one pointer type.

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


More information about the cfe-commits mailing list