================ @@ -10088,9 +10088,13 @@ static bool allowAmbiguity(ASTContext &Context, const FunctionDecl *F1, const FunctionDecl *F2) { if (declaresSameEntity(F1, F2)) return true; - if (F1->isTemplateInstantiation() && F2->isTemplateInstantiation() && - declaresSameEntity(F1->getPrimaryTemplate(), F2->getPrimaryTemplate())) { - return true; + if (F1->isTemplateInstantiation() && F2->isTemplateInstantiation()) { + auto PT1 = F1->getPrimaryTemplate(); + auto PT2 = F2->getPrimaryTemplate(); + if (declaresSameEntity(PT1, PT2) || ---------------- usx95 wrote:
Added test https://github.com/llvm/llvm-project/pull/72213 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits