Index: clang/lib/Sema/SemaConcept.cpp =================================================================== --- clang/lib/Sema/SemaConcept.cpp +++ clang/lib/Sema/SemaConcept.cpp @@ -398,7 +398,13 @@ // return false; //} if (FD->getTemplatedKind() == FunctionDecl::TK_FunctionTemplate || - FD->getTemplatedKind() == FunctionDecl::TK_DependentFunctionTemplateSpecialization) { + // TODO: ERICH: FunctionTemplateSpecialization doesn't seem to fit here, + // since it'll be non-dependent, but I think these will all be checked + // 'the other way' + FD->getTemplatedKind() == + FunctionDecl::TK_FunctionTemplateSpecialization || + FD->getTemplatedKind() == + FunctionDecl::TK_DependentFunctionTemplateSpecialization) { Satisfaction.IsSatisfied = true; return false; } @@ -427,17 +433,10 @@ if (addInstantiatedParametersToScope( const_cast(FD), // TODO: ERICH: in SemaTemplateInstantiateDecl, we had to do this on - // MLTAL2 (with additional outer args), do we need to do so here? + // MLTAL2 (with additional outer args), do we need to do so here? Do + // we have to do the 2nd addInstantiatedParametersToScope? FD->getPrimaryTemplate()->getTemplatedDecl(), Scope, MLTAL)) return true; - - const FunctionTemplateDecl *PrimaryTemplate = FD->getPrimaryTemplate(); - if (const auto *FromMemTempl = - PrimaryTemplate->getInstantiatedFromMemberTemplate()) - if (addInstantiatedParametersToScope(const_cast(FD), - FromMemTempl->getTemplatedDecl(), - Scope, MLTAL)) - return true; } // We substitute with empty arguments in order to rebuild the atomic