The callback uses clang::FunctionTemplateSpecializationInfo::getPointOfInstantiation() which gives the clang::SourceLocation of the beginning of the explicit instantiation. In the example above that would be the column corresponding to the beginning of doSomething. How can one get the begin of the whole declaration and how can one get the end of the declaration?
Member FuncWithDef (const clang::ast_matchers::internal::Matcher< clang::NamedDecl > &excluded_names)
This matcher is not sharp enough. Only function templates or class template member functions are necessary or specializations of them.