<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/63627>63627</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
The alias-declaration of decltype lambda is broken in the for loop
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
hewillk
</td>
</tr>
</table>
<pre>
Clang accepts the following invalid code.
```cpp
template<class T>
void f() {
for (using U = decltype([]{}.operator----);
auto x : "abc") { }
};
int main() {
f<int>();
}
```
https://godbolt.org/z/dTKbnv3nE
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkkstupDoQhp-m2JRokTLNZcEiHcLmbPs8gI0L8MTYCJvOZJ5-RDdJRjMSwnLd_q9cJUMwo2Nu4HyBc5vILU5-bSZ-N9a-Jcrrj-bFSjei7HteYsA4MQ7eWv9u3IjG3aQ1Gnuv-QRZC9nz8S-yx9cvy8MSeV6sjAzipbcyBLyCeH24bt5oHIAqoBqhvDysiINfEajawi71P4JoUXNv48fCe_AdeQ8v25NfeJXRr2mapkA1iAseVeQWPf5EEM8IRFL1QHToIJTtgVu2IC5_NmBcxFka9w_VAOLFuLjD313feV_FPnt_XKcYlwDiGagD6kavlbfx5NcRqPsF1Onrf8rdhHtNdCN0LWqZcPNUVNVTXuSVSKYmL0gwDyyVIkms9VCdxVkPXPX1ecjqxDSUkcgKkT2VIs_pJHLZZ0wFMw1nJQrIM56lsSdrb_OunZgQNm4KUVCZWKnYhs8dWJs9KFXbGCDPrAkxfKdFEy0314lRWiNDus9DrjIa79APX-NBK2elJZqAavVv7NC4Y3VWtN4vybba5q-XMXHa1Kn3M1C3Cx5Huqz-B_cRqLtDB6Duzv07AAD__5G9z7A">