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
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
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
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
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
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(
---
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
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
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
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
10 matches
Mail list logo