1.. title:: clang-tidy - objc-missing-hash
2
3objc-missing-hash
4=================
5
6Finds Objective-C implementations that implement ``-isEqual:`` without also
7appropriately implementing ``-hash``.
8
9Apple documentation highlights that objects that are equal must have the same
10hash value:
11https://developer.apple.com/documentation/objectivec/1418956-nsobject/1418795-isequal?language=objc
12
13Note that the check only verifies the presence of ``-hash`` in scenarios where
14its omission could result in unexpected behavior. The verification of the
15implementation of ``-hash`` is the responsibility of the developer, e.g.,
16through the addition of unit tests to verify the implementation.
17