New check to check if a class defines all special members of none of them. This also known as rule of five and zero.
Specified in CppCoreGuidelines: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all.
In summary the check will
- Checks class defines all special members of none of them.
- It also see if the base class deletes the special members or not.
- Has two modes with the flag strict-check.
- Strict mode will check all or nothing strictly.
For some combination, compiler explicitly delete the special members or does not declare implicitly. In that case don'nt have to define all the special members.
For example, in case of defining all members except move constructor and move assignment compiler will not implicitly declare the move constructor and move assignment.
For non strict mode we will consider these combinations as safe.
I found one review https://reviews.llvm.org/D16376 already related to this.
I modified my changes based on this. But I could not find out why this got abandoned.
You need to implement the storeOptions method to store this.