[clang] [Clang][Sema] Fix the lambda call expression inside of a type alias declaration (PR #82310)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 8 07:09:59 PDT 2024


zyn0217 wrote:

> Still crash on
> 
> ```c++
> template<auto F> constexpr auto x = F();
> template<class> constexpr int a() { return 1; }
> 
> template <class>
> struct A {
>     using Func = decltype(
>     []<class T>(T) {
>         return x<[] constexpr { return a<T>(); }>;
>         // return x<[] constexpr { return b(); }>;
>     }.template operator()<unsigned long long>('2')
>     );
> };
> A<short>::Func y;
> ```

That is a distinct case: Func does *not* form a `TypeAliasTemplateDecl`, and thus it is *not* supposed to be covered by this PR. Please submit a new issue for it.

https://github.com/llvm/llvm-project/pull/82310


More information about the cfe-commits mailing list