<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/59771>59771</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            crashes on generic lambda with lambda in decltype (clang-frontend crash) label:clang-frontend
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Dino1694
      </td>
    </tr>
</table>

<pre>
    Here's the compiler explorer I have for it:
https://godbolt.org/z/aTMPMMMqa
I compiled it on whatever the current compiler explorer's clang trunk is.
In case the compiler explorer link goes stale, I have attached the code (tmp.txt, its a cpp file)
I used clang flags: "-Wall -std=c++20 -emit-llvm -Xclang -disable-llvm-passes"

I tried to reduce the code by hand as much as I could.
This is my first LLVM bug submission.

[tmp.txt](https://github.com/llvm/llvm-project/files/10328303/tmp.txt)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkk9vnDwQxj-NuYxYGbMEOHDIviv0RspKPURtr8YewI2xqcck2X76Cna36R_10JPB9jzzex6PJDKDQ2xYcWDFMZFLHH1ojsb57K7eJ53X5-Z_DMhESRBHBOWn2VgMgG-z9QEDPMAoXxB6H8BElt8zfmT8foxxpvVPtEy0g9edt3Hnw8BE-42JVj6dPpxOp6_ycv3hJqzBRPAOXkcZ8QXDpekSArr4Z_MNS1npBohhcc9gaHcVdKAk4V-YrXHPMHgkoCgtMvHfzYaMUaoR9bVQIzBRxWnexbe4XjORQIKaZ-jNWljf-BdCfUXprRxW78CESD9JayGlqFl-VEwcmDgIDilOJqbWvkyQfr5UpdqQ7Cxuu-ksiZCYEBf9W5cYzMrmIaBeFL5TdmcYpdMgCaZFjeu6ZrpYfQ3kaTQEhmA6Q28CRXh8_HiCbhmAlm4yRMa73c_NWHG4-S6OTFS_vaiJ49LtlJ-YaFfi65LOwX9BFZlo14CIiTbjuahynjPR_gjyGluim1zXeS0TbLK7UhT7qsyyZGwwwzoXWmGte11lXbnPRLlXvcq7Ps-5TEwjuMh5xjO-L7Ii24mqQs11lRdcc63u2J7jJI3drVTr4CWGaMGmqMsyS6zs0NI29kI4fIXtcI27OCah2Zx0y0Bsz62hSO8q0USLjQqSRqR1Ugd0GIwCK6dOS3g1cbx9GwcalY3neRuj7Z3TPngX0WnYNJioYYNh-f2v58kSbPPPoW8-1tQ3n98DAAD___x-QZo">