<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/119583>119583</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang] Crash: SIGSEGV emitted when variable declared in lambda init-capture is used in parameter type
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
MagentaTreehouse
</td>
</tr>
</table>
<pre>
```c++
template <class T>
void f(T t) {
[x = t] (decltype(x)) {};
}
```
Crash since clang 17:
```console
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
Compiler Explorer: https://godbolt.org/z/6EWaoa79s
Maybe related to the implementation of this DR, but I am not sure:
* DR11: Change scope of lambda trailing-return-type ([P2036R3](https://wg21.link/P2036R3), [P2579R0](https://wg21.link/P2579R0))
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEU9Fu4zYQ_JrVy8KGSEa29KAHxYoO93DAIRe0zytpI7GlSIGkfEm_vqAct2lRoAABE-DMemZnRCHoyTLXUDxC0Wa0xdn5-htNbCO9eObZbYGz3o3vNZzy2xlAPqaTN5GX1VBkBHUZDIWAL6CeIG-uTo_4CrJ8wQiyQjgnOCIiFI9vCKrFCEWLIMuRBxPfVwZZvoGs7uhzCypx0iVv_vrvdM-bi6cwY9B2YBwM2QnFGVTzGTg4G5xhyJvv3k2eFozsF20p8og_dUz0yZIB1eCPr19-PH35JQ12y6oNe_QcN295TM9CVf8h4Y58eluN8-wTco5xDUmI7EB2kxt7Z-LR-Qlk9wfI7vT0Kzk6V-E24xu994yezS4qOowzo15Ww0vaf9TOonvFOOuA7TPIC_ZbxK9IC1oXMWyeP1znDcgG22chkozLTHZiDINbOQ0wtPQjYfSkjbbT4WbukLaeEoDi8bvM1elZQdGCLP_p4uckxdFo-zvI7g5LMV1w5xXn6jn_f94NtsebjbUaK1VRxrU4K1WpQsgym-t86Kk4jWrIBZ1GmZeirJhUxQWLfhheM13LXD4IKYQ4qfKhPCrRF5JYlqIkUb4O8JDzQtocjbkuae-ZDmHjWoiqKFVmqGcT9rJLufcGpEy993UiHPptCvCQGx1i-HtE1NHsX8hlZxQt7vX7VBzkRce9VzNbvJLX1BvG1GzyPKK29wi01fEw0Bo3z6gDbuH2vJKnhSN7TKFkmzf1v7qk47z1x8EtILsk7ePnsHr3Gw8RZLdbDSC7D7fXWv4ZAAD___HNLJI">