<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114811>114811</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
bugprone-use-after-move should catch std::optional::has_value
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
higher-performance
</td>
</tr>
</table>
<pre>
Per https://github.com/llvm/llvm-project/pull/114255#discussion_r1826547993, `std::optional::has_value` should probably be considered bug-prone after a move, since it implies the use of `std::optional::value` afterward, which is moved-from.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkkuO3CoUhleDJ8glwNiFBwz63qjG2UGLx7EhwsbiQJV695Hd6mSWKCOEkL6f_2EQ47oDaDL-R8ZvnWk15KJDXAOU_oCy5LKZ3UFns__Q36HQUOuBZHgj4kHEY401NHtzeSPikdLz6-iPkn-Aq0Q8jpYSEQ_OpRhHIgYf0TXEmPf3wpWYRnmf54GI_ymZGFZ_soe3fNSYd5M-b8Hg-9OkBmRiFENuydOjZGts-qAWqMs7Rg8FPLVtPcV3oGapUKihW37Cice4O6Cx0rgdKQLSGoA2BJqXP0j_kr1wL1P8yXqF6AKNeMF9v5S83TqvBz8Ps-lA8_vA7oNks-qCnqQAs9yVHybFJEg-csbHefLMmbsStotaMCE5Z5KPQnF14wacMnIA5RaY_EQkg83EdDuzveWydhGxgeZcKs67ZCwkvEoUYocXvV6JEGenRV-F2LYikSxFrPgbU2NNoG1br8j6htBfPvvT11fSzlQX6N-q6VpJ-p_Xcf0UP_dxWnlq8TMAAP__AMbWyA">