[PATCH] D150411: [NFC][Clang][Coverity] Fix Static Code Analysis Concerns with copy without assign
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 16 15:53:15 PDT 2023
aaronpuchert added a comment.
I'd probably abstain from explicitly deleting what is already implicitly deleted, but otherwise this looks good to me. Thanks!
================
Comment at: clang/include/clang/Sema/Sema.h:1790
SemaDiagnosticBuilder(const SemaDiagnosticBuilder &) = default;
+ SemaDiagnosticBuilder &operator=(const SemaDiagnosticBuilder &) = delete;
~SemaDiagnosticBuilder();
----------------
tahonermann wrote:
>
Being explicit is certainly a good thing, but the C++ committee wants to go into the direction of "copy/move operations are implicitly deleted if any of them or the destructor is user-declared." See [depr.impldec](https://eel.is/c++draft/depr.impldec). It is already partially the case, for example here. So why do need to spell something out explicitly when the language goes into the direction of being even more implicit?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150411/new/
https://reviews.llvm.org/D150411
More information about the cfe-commits
mailing list