gbencze added a comment. In D70052#1740142 <https://reviews.llvm.org/D70052#1740142>, @mgehre wrote:
> Did you consider to warn on copy constructors/assignment operators take a > their arguments by non-`const` reference, and suggest the user to turn them > into const references? This seems like a more useful (and easier) check to me. > The link above contains `Ideally, the copy operator should have an idiomatic > signature. For copy constructors, that is T(const T&); and for copy > assignment operators, that is T& operator=(const T&);.`. > > The only remaining case are then `mutable` members which are quite rare. I haven't really considered it as the non-compliant example has the idiomatic signature, but it probably would be a good addition to the check. misc-unconventional-assign-operator already seems to do this for the assignment operator. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70052/new/ https://reviews.llvm.org/D70052 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits