[clang-tidy] add check cppcoreguidelines-special-member-functions
authorJonathan Coe <jbcoe@me.com>
Sat, 30 Jul 2016 08:58:54 +0000 (08:58 +0000)
committerJonathan Coe <jbcoe@me.com>
Sat, 30 Jul 2016 08:58:54 +0000 (08:58 +0000)
commit5d304b2456afba562855a692a5ea4d10cc5da9e7
tree6714b10b6672049bfa6ec9d3a0676a886b092ec5
parentfcfec5fdef79cb4d96033aaabdb8286912d131ea
[clang-tidy] add check cppcoreguidelines-special-member-functions

Summary:
Check for classes that violate the rule of five and zero as specified in CppCoreGuidelines:

"If a class defines or deletes a default operation then it should 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.

Reviewers: alexfh, sbenza, aaron.ballman

Subscribers: Prazek, Eugene.Zelenko, cfe-commits, ericLemanissier, nemanjai

Projects: #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D22513

llvm-svn: 277262
clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt
clang-tools-extra/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp
clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp [new file with mode: 0644]
clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h [new file with mode: 0644]
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-special-member-functions.rst [new file with mode: 0644]
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions-cxx-03.cpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/cppcoreguidelines-special-member-functions.cpp [new file with mode: 0644]