================
@@ -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;
----------------
mizvekov wrote:

In this case, we don't even have the real function declaration that we want to 
start with, so I am afraid this is too much of an special case  to handle 
within `getTemplateInstantiationArgs()`.

I think the best way to handle this one is to have one overload of 
`getTemplateInstantiationArgs` which takes an initial MLTAL, and just adds more 
template arguments on top of it.

Yeah, I am planning on holding this off a little bit until the refactoring 
lands.

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

Reply via email to