[clang-tools-extra] [clang-tidy] Add [[clang::annotate("clang-tidy", "bugprone-use-after-move", "specified_after_move")]] to inform bugprone-use-aft… (PR #216121)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 14 02:35:37 PDT 2026
serge-sans-paille wrote:
> And still, I think annotating particular methods of containers is not scalable since standart `std::vector` and friends realistically may not have that. We can probably make an option to list all methods that are allowed to be called on moved object (similar to https://clang.llvm.org/extra/clang-tidy/checks/bugprone/use-after-move.html#cmdoption-arg-InvalidationFunctions) but Its not ideal as well.
I don't understand that argument. As a developer, I'd feel pretty happy to have a high-level way to state the behavior of each class wrt. being moved from.
https://github.com/llvm/llvm-project/pull/216121
More information about the cfe-commits
mailing list