[clang] [LifetimeSafety] Track origins for lifetimebound calls returning record types (PR #187917)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 26 03:43:56 PDT 2026


================
@@ -662,7 +681,7 @@ void FactsGenerator::handleFunctionCall(const Expr *Call,
   auto IsArgLifetimeBound = [FD](unsigned I) -> bool {
     const ParmVarDecl *PVD = nullptr;
     if (const auto *Method = dyn_cast<CXXMethodDecl>(FD);
-        Method && Method->isInstance()) {
+        Method && Method->isInstance() && !isa<CXXConstructorDecl>(FD)) {
----------------
usx95 wrote:

Thanks for confirming.. Makes sense.

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


More information about the cfe-commits mailing list