[clang] [LifetimeSafety] Fix liveness propagation for all origin flows (PR #205323)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 23 06:24:35 PDT 2026
================
@@ -887,6 +887,11 @@ void FactsGenerator::handleMovedArgsInCall(const FunctionDecl *FD,
const ParmVarDecl *PVD = FD->getParamDecl(I - IsInstance);
if (!PVD->getType()->isRValueReferenceType())
continue;
+ // Skip lifetimebound r-value reference parameters. Lifetimebound indicates
+ // that the parameter is borrowed (not consumed), so it should not be marked
+ // as moved even though it's an r-value reference.
+ if (PVD->hasAttr<LifetimeBoundAttr>())
----------------
usx95 wrote:
I would say that it has the same effect ?
https://github.com/llvm/llvm-project/pull/205323
More information about the cfe-commits
mailing list