[PATCH] D68185: [Diagnostics] Warn when class implements a copy constructor/copy assignment operator, but missing the copy assignment operator/copy constructor

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 12 06:53:38 PST 2019


xbolva00 added a comment.

Should we reconsider this as a clang warning? I found that the newest GCC can diagnose it.

GCC 9+:

-Wdeprecated-copy, implied by -Wextra, warns about the C++11 deprecation of implicitly declared copy constructor and assignment operator if one of them is user-provided. -Wdeprecated-copy-dtor also warns if the destructor is user-provided, as specified in C++11.

It woule be nice to keep compatibility. -Wextra seems reasonable for me too.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68185/new/

https://reviews.llvm.org/D68185





More information about the cfe-commits mailing list