[clang-tools-extra] [clang-tidy] Add `performance-explicit-move-constructor` check (PR #122599)
Congcong Cai via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 12 22:27:13 PST 2025
HerrCai0907 wrote:
> > This check sounds a bit strange. Is this issue common in real-world projects, do we have some data? It's the first time I've heard of it. Why would people deviate from the standard signature for move constructors?
>
> It's anecdotal, but I've encountered it in a few places in a private codebase. I don't think it's a _really_ common issue, but it'd be nice to have a lint warning for this.
It may happen. Some C++ newer will follow blindly follow some coding guideline and add explicit for all constructor with only one parameter. And it is hard to detect to be honest since small performance issues are always hard to detect.
https://github.com/llvm/llvm-project/pull/122599
More information about the cfe-commits
mailing list