================ @@ -4159,7 +4159,7 @@ FunctionTemplateDecl *FunctionDecl::getPrimaryTemplate() const { if (FunctionTemplateSpecializationInfo *Info = TemplateOrSpecialization .dyn_cast<FunctionTemplateSpecializationInfo*>()) { - return Info->getTemplate(); + return Info->getTemplate()->getMostRecentDecl(); ---------------- sdkrystian wrote:
@mizvekov I reverted the change where `getPrimaryTemplate` returns the most recent declaration & changed `getTemplateInstantiationPattern` to use the most recent declaration of the primary template instead in d312bd464bae21d127f468075cb78178f782ca9a. 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