[clang] [LifetimeSafety] Preserve extending references on content invalidation (PR #240003)

via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 8 01:53:13 PST 2026


https://github.com/NeKon69 commented:

Hey, thanks for your interest in LifetimeSafety.
Unfortunately, I don't think this is the correct solution for this problem. This patch just adds some more guessing to the whole analysis flow instead of solving the underlying issue that we can't currently detect when the whole object is invalidated and only the object's contents.
I also don't think that the chosen function is the correct location to put this fix, simply because `checkInvalidation` is designed to check whether invalidation happened or not given already produced facts, it shouldn't have any complicated logic to detect whether something is an MTE or a reference.
See: #222537, #186996, #207269 and similar which all report this problem.

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


More information about the cfe-commits mailing list