<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/81243>81243</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang reports about unuses captured `this` in lambda
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
shtanko-sv
</td>
</tr>
</table>
<pre>
Clang reports about explicitly captured `this` in lambda as unused, but it's actually needed to call some other method. Some minimal example: https://godbolt.org/z/3cvn79x5b
I cannot be absolutely sure about this, but it seems like it happens only if captured list contains only `this`, if capture something else it's not reproducible.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8ks1u3DoMhZ9G3hAZaGR7fhZe5CYwcNd9AkrijNXQkmFSQaZPX3iadICi6EaCJII65_BDkXTNRIPp_zP9a4NVp7IOMinmt_Ik740v8Ta8MOYrrLSUVQXQl6pAHwunkJRvEHDRulIEc7A6JTEHCykD4-wjAgrUXIWicS_gq0JS444CGLQi8w0yUaQIWiAgM0iZCYpOtMJMOpW4g2_b1ZxympGBPnBemEz7DJPqIqZ9Nm40bryW6AvrrqxX48Yfxo1teM_H80fvjX019vnX-j8EzLkoeAL0Urgq8Q2krvRp7e7ht1gQolmA0xttpwmXhbJAyXyDdHmY5yQKoWTF9PX8yGNr9yi-e9Qp5SsQC30lsolaaVlLrCF5ph00cWjjuT1jQ8P-aI_d8WyP-2YaLhj6tju1eDnRybe9c-gO0R7O7cn2GFyTBmddZ5097_fW9sddd7Fuj_2lu3jrY4umszRj4h3z-7xl1iSRSsNp77q2YfTEcsfCubCN3zi3EbIOW_2Tr1cxnd08y6ODJmUawl9ouRMg_yalqSsPf4w06VT9LpTZuHH75nN7WtbynYIaN95Vi3HjXfjPAAAA__84LvEL">