aaronpuchert added inline comments.
================ Comment at: clang/lib/Sema/SemaCoroutine.cpp:896 + if (S.CanPerformCopyInitialization(Entity, &AsRvalue)) + return true; + } else if (auto *FTD = dyn_cast<FunctionTemplateDecl>(D)) { ---------------- Overlad resolution can actually still fail if there is a viable candidate, namely when there are multiple candidates and none is better than all others. It's a bit weird though to fall back to lvalue parameter then as if nothing happened. ================ Comment at: clang/lib/Sema/SemaCoroutine.cpp:903-909 + QualType ParamType = ParamTypes[0]; + if (!ParamType->isDependentType()) { + InitializedEntity Entity = InitializedEntity::InitializeParameter( + S.Context, ParamType, false); + if (!S.CanPerformCopyInitialization(Entity, &AsRvalue)) + return true; + } ---------------- I should add a test case where this is necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68845/new/ https://reviews.llvm.org/D68845 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits