Lines Matching defs:FoundTemplate
6101 auto *FoundTemplate = dyn_cast<ClassTemplateDecl>(FoundDecl);
6102 if (FoundTemplate) {
6103 if (!hasSameVisibilityContextAndLinkage(FoundTemplate, D))
6108 (FoundTemplate->getFriendObjectKind() != Decl::FOK_None) !=
6110 if (IsStructuralMatch(D, FoundTemplate, /*Complain=*/true,
6112 if (DependentFriend || IsDependentFriend(FoundTemplate))
6116 getTemplateDefinition(FoundTemplate);
6120 FoundByLookup = FoundTemplate;
6132 FoundTemplate->getFriendObjectKind() != Decl::FOK_None &&
6133 D->getFriendObjectKind() != FoundTemplate->getFriendObjectKind() &&
6134 IsStructuralMatch(D, FoundTemplate, /*Complain=*/false,
6435 if (VarTemplateDecl *FoundTemplate = dyn_cast<VarTemplateDecl>(FoundDecl)) {
6437 if (!hasSameVisibilityContextAndLinkage(FoundTemplate->getTemplatedDecl(),
6440 if (IsStructuralMatch(D, FoundTemplate)) {
6443 VarTemplateDecl *FoundDef = getTemplateDefinition(FoundTemplate);
6445 assert(FoundTemplate->getDeclContext()->isRecord() &&
6451 return Importer.MapImported(D, FoundTemplate);
6456 FoundByLookup = FoundTemplate;
6712 if (auto *FoundTemplate = dyn_cast<FunctionTemplateDecl>(FoundDecl)) {
6713 if (!hasSameVisibilityContextAndLinkage(FoundTemplate, D))
6715 if (IsStructuralMatch(D, FoundTemplate)) {
6717 getTemplateDefinition(FoundTemplate);
6721 FoundByLookup = FoundTemplate;