dodicidodici 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.

> We could perhaps consider making this check a bit more general and enforce 
> that all 5 special member functions have the correct signature (including 
> ref-qualification and `noexcept`).

There's `performance-noexcept-move-constructor` and 
`performance-noexcept-destructor` that cover missing `noexcept`s. Also yes, 
making it more generic is a great idea (altough I thought there were other 
lints that were doing that).

https://github.com/llvm/llvm-project/pull/122599
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to