[clang] [Clang][Sema] fix outline member function template with default align crash (PR #78400)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 22 06:39:19 PST 2024
================
@@ -3063,11 +3064,18 @@ bool Sema::SubstDefaultArgument(
/*ForDefinition*/ false);
if (addInstantiatedParametersToScope(FD, PatternFD, *LIS, TemplateArgs))
return true;
+ if (FD->isOutOfLine()) {
+ auto *CurrentTemplateArgumentList = TemplateArgumentList::CreateCopy(
+ getASTContext(), TemplateArgs.getInnermost());
+ NewTemplateArgs = getTemplateInstantiationArgs(
+ FD, FD->getDeclContext(), true, CurrentTemplateArgumentList, true,
+ nullptr, false, false);
----------------
erichkeane wrote:
Needs `/*argname=*/ ` comments on bools/nullptrs.
https://github.com/llvm/llvm-project/pull/78400
More information about the cfe-commits
mailing list