[clang] [LifetimeSafety] Track origins through nested subobject fields (PR #232867)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 17 05:54:14 PDT 2026


================
@@ -256,6 +256,30 @@ OriginList *OriginManager::getOrCreateList(const ValueDecl *D) {
   return DeclToList[D] = buildListForType(D->getType(), D);
 }
 
+/// Returns true if the field named by \p ME denotes a subobject of `*this`,
+/// reached as `this->f` or through anonymous-struct/union subobjects.
+static bool isSubobjectOfThis(const MemberExpr *ME) {
----------------
steakhal wrote:

I've looked at the patch and it's in the subject but for an orthogonal problem. I could take that and rebase on top of this one and land that separately if desired. What do you think the best way forward is on this?

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


More information about the cfe-commits mailing list