[clang-tools-extra] [clang-tidy][NFC] Enable 'performance-move-const-arg' in '.clang-tidy' config (PR #148549)
Nicolas van Kempen via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 17 10:32:25 PDT 2025
nicovank wrote:
> However, from author's point of view, he intended not to use that data anymore so he used std::move to "semantically" flag it. I'm more in favor of preserving "semantics" so put CheckTriviallyCopyableMove to false.
Adding that keeping `std::move` is robust in cases when the class might change and add a movable data member later on. However, it may also mislead/confuse some people reading the code about what kind of fields a class has, or think a class can be efficiently moved when it isn't the case.
I have a small preference for `CheckTriviallyCopyableMove: false`, and let users decide.
https://github.com/llvm/llvm-project/pull/148549
More information about the cfe-commits
mailing list