[PATCH] D98034: [clang-tidy] Use-after-move: Ignore moves inside a try_emplace.
Martin Böhme via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 5 06:14:32 PST 2021
mboehme added a comment.
In D98034#2606488 <https://reviews.llvm.org/D98034#2606488>, @njames93 wrote:
> While `try_emplace` is a special case, it's may not be the only special case in someone's codebase, this should be extended with options to let users handle their special containers.
Sorry, I didn't see your comment before submitting.
I agree that there may be other cases of "maybe move" functions, but try_emplace seems to be the most common case. Handling "maybe move" functions more general would require some way of annotating them; I felt it was useful to get the try_emplace case handled first.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98034/new/
https://reviews.llvm.org/D98034
More information about the cfe-commits
mailing list