[clang] [LifetimeSafety] Fix crash on explicit object member functions (PR #212154)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 27 02:49:22 PDT 2026
================
@@ -929,6 +930,8 @@ void FactsGenerator::handleMovedArgsInCall(const FunctionDecl *FD,
for (unsigned I = IsInstance;
I < Args.size() && I < FD->getNumParams() + IsInstance; ++I) {
const ParmVarDecl *PVD = FD->getParamDecl(I - IsInstance);
+ if (PVD->isExplicitObjectParameter())
----------------
arhwx wrote:
Yes, but also because marking them as moved would trigger a `-Wlifetime-safety-lifetimebound-violation` warning on code that trunk accepts and would switch your t1 and t2 from `return-stack-addr` to `return-stack-addr-moved`.
https://github.com/llvm/llvm-project/pull/212154
More information about the cfe-commits
mailing list