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

    <tr>
        <th>Summary</th>
        <td>
            [bugprone-use-after-move,hicpp-invalid-access-moved] bogus diags about OpenMP Data-Sharing Attribute Clauses
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            openmp,
            clang-tidy
      </td>
    </tr>

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

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

<pre>
    ```
#include <vector>
void square(std::vector<int> num) {
#pragma omp task default(none) shared(num)
 (void)std::move(num);
}
```
```
<source>:3:39: warning: 'num' used after it was moved [bugprone-use-after-move,hicpp-invalid-access-moved]
#pragma omp task default(none) shared(num)
 ^
<source>:4:5: note: move occurred here
    (void)std::move(num);
 ^
<source>:3:39: note: the use and move are unsequenced, i.e. there is no guarantee about the order in which they are evaluated
#pragma omp task default(none) shared(num)
 ^
```
This diag is complete nonsense. You can't write this any other way,
and worse yet, move happens "after" `shared()`, which doesn't even "use" it.

https://godbolt.org/z/WY85aWPxK
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVF2P6zQQ_TXOyyhVOk42zUMeuu1WQoC4AqSr-ziJp4khsXP90VJ-PXLa3RUrkBAgtbFjz5wz53hi8l4PhrkV1bOojhnFMFrXfscdK778-E3WWXVrxVPx-BVHUewFSm36KSoGIQ8X7oN1Qr7cNy9WK_BfIzkWuPNBCbkXcv8addAmCPkCJs4CGxD18xvm4miYCey8QCD_Kyg-U5yCwJ2xhlO0H8mxSgtr9j0TBO4SqcDmjW22F34Pk68c9fEx-aDnw6s8eBtdz0mT3Mv0b4Tcw5Wc0WZIU4H1Cl5D9KyAzoEd6ABX8pDIFYjquYvD4qzhPHrO15D8Xthh1P2y5NpcaNIqp75n79c9JarjfzekevlLJaWQ-ypVb2zgNCZGsH0fnWMFIzt-IAD8c1f_lu7duFe-MHLyC8ioOzc5hmg8f41s-iTkAHrDmxToGLQHY2GI5MgEZqDOxrCCWKeS3wauo-7HtHRbsfhCU6TA6n_08M_N8fOoPShNQ6qut_MycWAw1ng2njfwxUboyQisA1ydDgwhZZC5gU2q4Eo3gYc7WPLhap1nuHFI4ldTRloWNh4E4to0AhHEU_FWZyryqUjhd_XKsr8T8oVNSoueU5IOm4eG9TmGsPh0kngSeBqs6uwUNtYNAk-_Czx9_rKr6POn377NVCtVIxvKuN0-1cV2W--aOhvbripph4q2qM4VsywRS2rKvtt2_bkuq0y3WCBusSiLrdxt5aYpuSgUs-KyqnZNJcqCZ9LTZpouc-LOtPeR26qRWGcTdTz59S5CtAubeRGIyS7EfiIz5EGrW1qqjplrE0bexcGLspi0D_4dNegwrZfav_wGobNDvB-0f_TdDwub7z_BkQLlP43ktBlgH4LTXQwMh4miZ59FN7UfjNZhjN2mt7PAUyrwMeSLs79wHwSeVg-8wNNqwx8BAAD__y1SuK4">