================
@@ -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>())
----------------
Xazax-hun wrote:

What if it was referenced by a `lifetime_capture_by` annotation?

https://github.com/llvm/llvm-project/pull/205323
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to