<div dir="ltr">All the C++ compilers I have tried using (GCC,Clang,MSVC) will generate assignment operators even if the user defines a copy-constructor. This is the behaviour I set out to write a check for.<div><br></div><div>The cpp core guide lines recommend defining all or none of the special functions <a href="https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all">https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all</a></div><div><br></div><div>If the deprecation warning you mention will turn off the deprecated generation of special member functions when others are defined (or warn when deprecated compiler-generated functions are used) then the rule-of-five check is of reduced value.</div><div><br></div><div>Jon</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 February 2016 at 17:40, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is this really that useful of a rule? The language does the right thing for the most part already (you don't need to explicitly delete them - they're implicitly deleted if you define any others - except for backcompat with C++98, but those cases are deprecated & we should probably split out the warning for that deprecation so it's easier to turn on separately)</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Feb 3, 2016 at 5:25 AM, Jonathan B Coe via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">jbcoe retitled this revision from "clang-tidy check: Assignment and Construction" to "clang-tidy check: rule-of-five".<br>
jbcoe removed rL LLVM as the repository for this revision.<br>
jbcoe updated this revision to Diff 46775.<br>
jbcoe added a comment.<br>
<br>
I've responded to review comments (thanks for those) and renamed the check to 'rule-of-five'.<br>
<br>
I think it needs moving to cppcoreguidelines and needs destructor handling adding to it. As suggested, I'll address that in a later patch if everything else looks ok.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D16376" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16376</a><br>
<br>
Files:<br>
  clang-tidy/misc/CMakeLists.txt<br>
  clang-tidy/misc/MiscTidyModule.cpp<br>
  clang-tidy/misc/RuleOfFiveCheck.cpp<br>
  clang-tidy/misc/RuleOfFiveCheck.h<br>
  docs/clang-tidy/checks/list.rst<br>
  docs/clang-tidy/checks/misc-rule-of-five.rst<br>
  test/clang-tidy/misc-rule-of-five.cpp<br>
<br>
<br></div></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>