Discussion about this post

User's avatar
Sukraat Ahluwalia's avatar

There does exist a clang-tidy check for this, performance-move-const-arg: https://releases.llvm.org/10.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/performance-move-const-arg.html

It also checks for when the argument is trivially copyable, where a std::move() would be a no-op.

Expand full comment
2 more comments...

No posts