<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/86404>86404</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] [false-positive] performance-move-const-arg
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
schaumb
</td>
</tr>
</table>
<pre>
The current check falsely tries to remove the `std::move` when the return value is a rvalue reference type.
An example:
```cpp
struct A {};
struct B {
operator A&&() const {
static A a;
return std::move(a); // Clang-Tidy: Std::move of the variable 'a' of the trivially-copyable type 'A' has no effect; remove std::move()
}
};
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcklGyoywQhVfTvnSZQkgUH3wwfyob-O8GENvIDIoFmJnsfgqSeyd3qqjEOhwaztetQjC3laiD0xlOl0LtcXa-C3pW-zIUgxsf3cdMqHfvaY2oZ9I_cVI2kH1g9IYCRoeeFncnjDMh1CzEEUQPok8i1Ax_zbTmTU9x9yveld0JTUCF_vntaSJPqyaMj40OwC7A-udvvyL9VstmKRV924CaPZfetqcSot91xB6hOUNzAXH-pp-znhVEt5FX0Xnsgdd5SeAtareG-O5DDFFFo7FH9VXwM8j3pFwq4C2IMwK_Ar_if1att_LDjA8QPf7_bkY3ZSJ35Y0aLCHwRgFvPvXozd0oax-ldtsjOxKZZOuTbVYBV4c0TaRjuvLVgn9flDK93pyIPMG9ofmC-E62GDsxtqJVBXVVU1W8qhpZF3PXjCdR1QNnk6zFVLeybVSjaVCMSUlSFKbjjB-Z4KKqRc3rg26HVtA4ikkOcjxJODJalLEHa-_LwflbYULYqZP1kR0LqwayIQ8j5zrTi4ke52k4fZcOlcN-C3Bk1oQY_paJJto8xm_HTheE0zlPa7m5YKK5UxI38pPzi1o1lYlTmbteKn8rdm-7OcYtJIq5izcT5304aLcAv6brXn_l5t2PBJ9fc4QA_JpT_AkAAP__piwCcQ">