================ @@ -492,8 +489,10 @@ MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( // has a depth of 0. if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(CurDecl)) HandleDefaultTempArgIntoTempTempParam(TTP, Result); - CurDecl = Response::UseNextDecl(CurDecl).NextDecl; - } + CurDecl = DC ? Decl::castFromDeclContext(DC) + : Response::UseNextDecl(CurDecl).NextDecl; ---------------- zyn0217 wrote:
Hmmm, now that we end up having to wire up `DC` and `Innermost`, we'd need to update the doxygen of `getTemplateInstantiationArgs()` as well. Same question as the last attempt of doing so: can we somehow 'introspect' the use case and handle them separately within the function? Or rather, given that @sdkrystian is going to reland his refactoring work soon, can we try to rebase the implementation on top of that so that we would have less pain when these two are merged? https://github.com/llvm/llvm-project/pull/110387 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits