[PATCH] D26138: [clang-tidy] Add modernize-use-delete check
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 31 09:03:54 PDT 2016
alexfh added a comment.
"Use delete" makes me think of the `delete` operator. I'd suggest one of these names:
- modernize-use-equals-delete
- modernize-use-deleted-special-members
- modernize-delete-special-members
(feel free to suggest a better alternative).
================
Comment at: clang-tidy/modernize/UseDeleteCheck.cpp:37
+ hasParent(cxxRecordDecl(unless(hasMethod(
+ unless(anyOf(PrivateSpecialFn, hasBody(stmt()), isPure(),
+ isDefaulted(), isDeleted())))))))
----------------
The double negation makes this part hard to parse. Can you add a comment saying (roughly) that the matcher ensures that all non-special functions declared in this class are defined in some way in the translation unit we're looking at?
https://reviews.llvm.org/D26138
More information about the cfe-commits
mailing list