<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/65317>65317</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] False positive cppcoreguidelines-rvalue-reference-param-not-moved when members are moved from
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chrchr-github
</td>
</tr>
</table>
<pre>
~~~c++
#include <vector>
struct S {
std::vector<int> v;
std::vector<std::vector<int>> w;
};
void f(S&& s, S& t) {
t.v = std::move(s.v);
t.w = std::move(s.w);
}
~~~
~~~
<source>:8:12: warning: rvalue reference parameter 's' is never moved from inside the function body [cppcoreguidelines-rvalue-reference-param-not-moved]
8 | void f(S&& s, S& t) {
| ^
~~~
https://godbolt.org/z/Ez8Eb59zs
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU91uszoQfJrlZgWCdc3PBRdpEl6gTwBmAz4CO7INUXuRZz-C0zZRjyp9nxU5i5hhZna1rfd6MMw1yFeQp6hdwmhdrUanRhcPOoxLF3W2f6_v97sCet1-6QnSA5DQRk1LzwjiuLIK1oE4f77cbx_cogK-IRSfJEREH3oQBxCHL85RmwDijCuIL9j_Mb-xNuLtmwjF6VHv92p1jxeg8g0oB8rRAx1xe8AAVD1ZC8mKIE4P7dmuDFT6ZAWqHt4QMSS3X6C3Z-jmZi_u9_uPYktkF6d4j3AoQRwyAnHAW-uMNsNWurWdFkbHF3ZsFOO1de3MgR0CFR6oQO3R8MoONwM9XpydURuve8YwMl4Wo4K2BrcJIshXdb0q63hYdM-TNuzj_0Tib5F4F4mNDfH-TZCnR-4SoTjin7d0Pxvl6YA8_-jFGMLVb32kBqgZbN_ZKSTWDUDNB1Bz_ijPnaw-fNTXoq9E1UZcZ3klqiyXOUVjrcqu6LJSdapQWaGqkiuZplmVpdxeCq4iXVNKIq1SmRHRCyVtn4pCSUkXSTnnEl5Snls9JdO0zpt2pL1fuM6lyIpoajue_NeOuHoDxd0yeHhJJ-2Df9CCDtO-TWpqzRAH3b-DPGHTTp7xar0OemX8-zngbWSDM88dO4-t46eRR4ub6h9d3Dc3UXYGajZzn3_x1dl_WAWgZg_ogZo9478BAAD__2PyNhg">