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

via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 17 06:05:19 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) {
----------------
NeKon69 wrote:

No no, I linked it here just for the context that we're already doing something similar. I think it's ok to land this as a standalone patch.

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


More information about the cfe-commits mailing list