================ @@ -4159,7 +4159,7 @@ FunctionTemplateDecl *FunctionDecl::getPrimaryTemplate() const { if (FunctionTemplateSpecializationInfo *Info = TemplateOrSpecialization .dyn_cast<FunctionTemplateSpecializationInfo*>()) { - return Info->getTemplate(); + return Info->getTemplate()->getMostRecentDecl(); ---------------- erichkeane wrote:
Most recent guarantees you have 'the most' information about the declaration, but there might be value in getting the definition if available, else most recent? https://github.com/llvm/llvm-project/pull/111173 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits