[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585)" (PR #111173)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 7 09:37:41 PDT 2024
================
@@ -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
More information about the cfe-commits
mailing list