<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/132419>132419</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Clang-Tidy] `cppcoreguidelines-rvalue-reference-param-not-moved` false positive on rvalue references since C++20
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-tidy,
            false-positive
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          MagentaTreehouse
      </td>
    </tr>
</table>

<pre>
    Given this code:
```c++
struct A {
    A(A &&) = default;
    A &operator=(A &&) = default;
};

A f(A &&a) {
    return a;
}
```

Even in C++20, Clang-Tidy says:
```console
<source>:6:9: warning: rvalue reference parameter 'a' is never moved from inside the function body [cppcoreguidelines-rvalue-reference-param-not-moved]
    6 | A f(A &&a) {
 |         ^
```

Seems like [P1825](https://wg21.link/P1825R0) is not fully implemented in this check.

See https://compiler-explorer.com/z/47o1jdnx8.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUU9GuozYQ_ZrhZUQEQ4DwwAM3uelTpardH3DMAN5rbGSb7KZfX5lkc_f2qqoWWcKY4zkzZ84I79VomFsoX6A8JWINk3Xt72JkE8QXxzzZ1XNysf2t_U1d2WCYlEdpe4aig6yDKrsvCfQSV9b54FYZsEOo4yciYgd06BCo2laDUJyw50GsOkDxBEWAXdiJYB0Up_-7A_Xpscm6Doef4GLDP9kdh9UZFO_Xfsr7fv81lqYMHu9VUAZ0xKMWZky_qP6GXtz8vwu2xlvN8ag4ers6yVC8QtFVUHQNFB1-E84oM8atuwq9Mjoe2LGRjItwYubADoFqAVSj8mj4yg5ne-UeB2dnVMarnjFMjMNqZFDWYOwFQvkil0Vax-OqetbKsE_vJOmTJN1IUmNDusWE8vRQpEKoj_jfosW_Px4oXz_r9Rfz7FGrN46p_JEfqIzR6TCFsGxK0Rno_G2kfKeVeQM6b6A_s8gSS7UBh1XrG6p50TyzCdzHDtz9NbF82z2p8GNUaedFaXYpf1-0dex20s5A57-Bzvva5l978_2wS_q26JuiEQm3eb2nsi4P-zyZWrmvRFFWw4V7rqvq0tSyPmRNJoe85qY6JKqljMqsoDyvyoyq3XAo9n3ZR0AtaZCwz3gWSu-0vs4768ZEeb9ymxe0z5tEiwtrv80UkdxMFFR_AyKgIxANQntOF-tVUFeOx-UpcW0Mll7W0cM-08oH_x4-qKC3IX23JJQnjC78dRdUGW4Z4I8M0JpPBvXoVfTpcyCS1en2Yx9GFab18hA_5vp4pYuzX1kGoPOmiwc6P6S5tvRPAAAA___FzVaU">