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

    <tr>
        <th>Summary</th>
        <td>
            Clang-Tidy: bugprone-use-after-move: Unclear message
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Reproduction:
````
// https://compiler-explorer.com/z/95ozGzc7d
// clang++ -std=c++20 -stdlib=libc++  -Weverything -Wno-c++98-compat -Wno-missing-prototypes t.cpp
// clang-tidy -checks=bugprone-use-after-move
#include <utility>

struct C {};

struct S {
    auto g(C c) -> void;
};

auto f(C c) -> S;

int main(int, char**) {
 auto c = C{};
 f(c).g(std::move(c));
}

````

Result:
````
[<source>:13:7: warning: 'c' used after it was moved [bugprone-use-after-move]]
 f(c).g(std::move(c));
      ^
[<source>:13:12: note: move occurred here]
    f(c).g(std::move(c));
           ^
[<source>:13:7: note: the use and move are unsequenced, i.e. there is no guarantee about the order in which they are evaluated]
    f(c).g(std::move(c));
      ^
1 warning generated.
````

In the example above, one would intuitively expect function f() to be executed before function g(). As such, one would expect the copy for f() to happen before the move for g(). Although the message clearly indicates that there is some resequencing going on, it is not clear why that is relevant. Having an explicit mention of function g() and the indication that it requires a temporary to be constructed, makes this message easier to understand for non-language experts. 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVcuymzgTfhp50wVlxMGYhRe-xP8_s0xmJmsh2qCJkIjUsg95-ikJJz65nZrKuFTCqLu__vqCWniveoO4Y9WBVaeVCDRYt_v9r_2EZtXabt69xcnZLkhS1rByz9Yntt6zzfqxlhN-ZvwMA9Hko1p6lXaclEaX4fOkrUOXSzsyfv7E-Lmp7Kf_fZJ195W91ML0jB8YP0DmqWPlSS6vfJ0OtGpZedKqvR8DZO_xim6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