================
@@ -4159,7 +4159,7 @@ FunctionTemplateDecl *FunctionDecl::getPrimaryTemplate()
const {
if (FunctionTemplateSpecializationInfo *Info
= TemplateOrSpecialization
.dyn_cast<FunctionTemplateSpecializationInfo*>()) {
- return Info->getTemplate();
+ return Info->getTemplate()->getMostRecentDecl();
----------------
erichkeane 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
> [d312bd4](https://github.com/llvm/llvm-project/commit/d312bd464bae21d127f468075cb78178f782ca9a).
That seems reasonable to me.
https://github.com/llvm/llvm-project/pull/111173
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits