================ @@ -3216,6 +3226,44 @@ void DeclareImplicitDeductionGuidesForTypeAlias( Guides.suppressDiagnostics(); for (auto *G : Guides) { + if (auto *DG = dyn_cast<CXXDeductionGuideDecl>(G)) { + // The deduction guide is a non-template function decl, we just clone it. + auto *FunctionType = + SemaRef.Context.getTrivialTypeSourceInfo(DG->getType()); + FunctionProtoTypeLoc FPTL = + FunctionType->getTypeLoc().castAs<FunctionProtoTypeLoc>(); + + // Clone the parameters. + unsigned ProcessedParamIndex = 0; + for (auto *P : DG->parameters()) { ---------------- zyn0217 wrote:
nit: I think we can just use ```cpp for (unsigned I = 0; N = DG->parameters().size(); I != N; ++I) ``` https://github.com/llvm/llvm-project/pull/96686 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits