================ @@ -7575,15 +7577,27 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, Path.pop_back(); }; - if (ObjectArg && implicitObjectParamIsLifetimeBound(Callee)) - VisitLifetimeBoundArg(Callee, ObjectArg); - bool CheckCoroCall = false; if (const auto *RD = Callee->getReturnType()->getAsRecordDecl()) { CheckCoroCall = RD->hasAttr<CoroLifetimeBoundAttr>() && RD->hasAttr<CoroReturnTypeAttr>() && !Callee->hasAttr<CoroDisableLifetimeBoundAttr>(); } + + if (ObjectArg) { + bool CheckCoroObjArg = CheckCoroCall; + // Ignore `__promise.get_return_object()` as it is not lifetimebound. + if (CheckCoroObjArg && Callee->getDeclName().isIdentifier() && + Callee->getName() == "get_return_object") + CheckCoroObjArg = false; ---------------- usx95 wrote:
I have refactored the check. The check still uses hardcoded names though. https://github.com/llvm/llvm-project/pull/77066 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits