// A non-template function that is an instantiation or explicit
// specialization of a member of a templated class.
TK_MemberSpecialization
Currently in ASTImporter we have a FIXME about TK_MemberSpecialization.
I am afraid that we have a technical debt here.
// If this is a function template specialization, then try to find the same
// existing specialization in the "to" context. The lookup below will not
// find any specialization, but would find the primary template; thus, we
// have to skip normal lookup in case of specializations.
// FIXME handle member function templates (TK_MemberSpecialization) similarly?
if (D->getTemplatedKind() ==
FunctionDecl::TK_FunctionTemplateSpecialization) {
auto FoundFunctionOrErr = FindFunctionTemplateSpecialization(D);
if (!FoundFunctionOrErr)
return FoundFunctionOrErr.takeError();
if (FunctionDecl *FoundFunction = *FoundFunctionOrErr) {
if (Decl *Def = FindAndMapDefinition(D, FoundFunction))
return Def;
FoundByLookup = FoundFunction;
}
}
// Try to find a function in our own ("to") context with the same name, same
// type, and in the same context as the function we're importing.
else if (!LexicalDC->isFunctionOrMethod()) {
Currently in ASTImporter we have a FIXME about TK_MemberSpecialization. I am afraid that we have a technical debt here.