[clang-tools-extra] [clang-tidy] Add `performance-explicit-move-constructor` check (PR #122599)
Julian Schmidt via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 20 09:39:05 PDT 2025
5chmidti wrote:
> > but this check could check the signatures themselves to be in the expected form
>
> So warning for signatures like `foo(foo&) = default`?
Looking at this again, maybe this shouldn't not that route. Other checks already capture some of those problems.
What @PiotrZSL mentioned was more for changing the detection to happen when the performance issue occurs, not preemptively based on the ctor declarations themselves. So detecting construction expressions that call a copy ctor with an rvalue (and xvalue I think) while a ln explicit move ctor is available (that could produce many more matches (perfwise this should not be that expensive overall due to the low analysis cost, but diagnostics might). So that would be a trade off to consider
https://github.com/llvm/llvm-project/pull/122599
More information about the cfe-commits
mailing list