[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-20 Thread Stephane Moore via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. stephanemoore marked an inline comment as done. Closed by commit rL372445: [clang-tidy] Add check for classes missing -hash ⚠️ (authored by stephanemoore, committed by ). Herald added a project: LLVM. Herald added a subscrib

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-20 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 2 inline comments as done. stephanemoore added a comment. Thanks for the review! Comment at: clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp:56 + const auto *ID = Result.Nodes.getNodeAs("impl"); + diag(ID->getLocation(), "%0 implements -isEqual: wi

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp:56 + const auto *ID = Result.Nodes.getNodeAs("impl"); + diag(ID->getLocation(), "%0 i

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-19 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 3 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp:56 + const auto *ID = Result.Nodes.getNodeAs("impl"); + diag(ID->getLocation(), "%0 implements -isEqual: without implementing

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp:56 + const auto *ID = Result.Nodes.getNodeAs("impl"); + diag(ID->getLocation(), "%0 implements -isEqual: without implementing -hash") + << ID; Do you th

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-19 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 4 inline comments as done. stephanemoore added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp:40 +void MissingHashCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher( + objcMethodDecl( ---

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-19 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 220823. stephanemoore added a comment. Restrict ojbc-missing-hash to Objective-C language variants and fix sorting of release notes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67737/new/ https://review

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:105 +- New :doc:`objc-missing-hash + ` check. Wrong place. Please move to new checks list (in alphabetical order). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/objc/MissingHashCheck.cpp:40 +void MissingHashCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher( + objcMethodDecl( Should check if language is Objective-C. See

[PATCH] D67737: [clang-tidy] Add check for classes missing -hash ⚠️

2019-09-18 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. Apple documentation states that: "If two objects are equal, they must have the same hash value. This last point is particularly important if you define isEqual: in a subcla