[PATCH] D137205: [clang-tidy] Add performance-unnecessary-copy-on-last-use check
Aaron Gokaslan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 7 07:33:57 PST 2022
Skylion007 added a comment.
One other bug I found with this diff, is it seems to suggest calling std::move() on function args that are references, despite the fact that invalidating the reference to the input arg could be undesirable. For instance take a function that takes in a reference to a String, assigns a new value to the arg reference, and then returns the value of the reference. It suggests calling std::move() on the arg ref when it is returned, which invalidate the reference to the argument.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137205/new/
https://reviews.llvm.org/D137205
More information about the cfe-commits
mailing list