zyn0217 wrote:

> or if we would implement a `TypeAliasTemplateSpecializationDecl` only for the 
> benefit of external resugarers.

It is not only valuable to external resugarers. Another point that warrants an 
introduction of it is for unevaluated lambdas. These lambdas e.g. appearing as 
part of the `using Alias = decltype(lambda)` could carry a requires expression 
and thus evaluating it requires the recovery of the instantiating template 
arguments for the type alias, which isn't a quite natural thing without such a 
Decl. I have improved some of these situations through an on-stack 
InstantiatingTemplate to help to inspect the template arguments; however, that 
approach is somewhat cumbersome and still couldn't extend to other scenarios 
e.g. mangling these lambdas. 
(https://github.com/llvm/llvm-project/issues/97024. We need a correct 
DeclContext for the lambda, yet a `TypeAliasTemplateDecl` isn't a DeclContext, 
unfortunately.)


https://github.com/llvm/llvm-project/pull/101858
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to