<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/134797>134797</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang diagnostics: false-positive warning "unused lambda-capture"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang,
false-positive
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
pprettysimpple
</td>
</tr>
</table>
<pre>
In this example clang (trunk) emits warning that lambda capture is not needed, when actually code does not compile without it.
https://godbolt.org/z/jGM18c93e
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxc0MGO2yAQBuCnGV9QIjy2Q3zgsM3KVQ99CAwTmy0GywxJ06evnEatuickNPp__Z_J2U-RSEP3Bbr3yhSe06bXdSPmR_bLugaqxuQe-lsUPPss6KdZ1kDCBhMnAXjmrcQfgL2gxXMWd7NFHyfBs2ERzDI6I6xZuWwkfBYxsYhEjhzgRdxnisJYLiaEh7DJkXCJ_lzZtKw-kLh7nlNh4fkI8m1mXjM0b4AD4DAlN6bAx7RNgMMvwOHj6_f6bPuGKqcb1ze9qUjXqm1lf5JKVbNGoubUSnXturp37tqN1smmUU3Xo61VU3mNEjvZyrNUUnXqaG2P3UmdTT1KW58ltJIW48MxhNuyd1c-50K6blrVqyqYkUJ-kiI-mQAR8AKIVxMyHdaUPfsb7d_de7XpPecwlilDK4PPnP8ls-dA-vLEdt5MMWX2dhcQ_4f9hQfEEksm99I_vPQBsSpb0J8EPc9lPNq0AA576-s5rFv6IMuAw3NcBhxe-24afwcAAP__hH26Kg">