================ @@ -12078,6 +12079,43 @@ static void DiagnoseFailedExplicitSpec(Sema &S, OverloadCandidate *Cand) { << (ES.getExpr() ? ES.getExpr()->getSourceRange() : SourceRange()); } +static void NoteImplicitDeductionGuide(Sema &S, CXXDeductionGuideDecl *DG) { + // We want to always print synthesized deduction guides for type aliases. + // They would retain the explicit bit of the corresponding constructor. + TemplateDecl *OriginTemplate = + DG->getDeclName().getCXXDeductionGuideTemplate(); + if (!DG->isImplicit() && (!OriginTemplate || !OriginTemplate->isTypeAlias())) ---------------- hokein wrote:
nit: it's easier to read if we write it as `if (... && !(OriginTemplate && OriginTemplate->isTypeAlias()))`. https://github.com/llvm/llvm-project/pull/96084 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits