[clang] [LifetimeSafety] More support for member expressions (PR #191865)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 17 02:06:11 PDT 2026
================
@@ -259,6 +259,7 @@ void FactsGenerator::VisitMemberExpr(const MemberExpr *ME) {
assert(Dst && "Field member should have an origin list as it is GL value");
OriginList *Src = getOriginsList(*ME->getBase());
assert(Src && "Base expression should be a pointer/reference type");
+ handleUse(ME);
----------------
Xazax-hun wrote:
Do we need this because we do not yet generate use facts from lvalue to rvalue conversions?
E.g., we might not want to consider this a use: `int &r = foo.field;`. Only when the storage referenced by `r` is actually read or written.
https://github.com/llvm/llvm-project/pull/191865
More information about the cfe-commits
mailing list