17 lines · plain
1.. title:: clang-tidy - objc-missing-hash2 3objc-missing-hash4=================5 6Finds Objective-C implementations that implement ``-isEqual:`` without also7appropriately implementing ``-hash``.8 9Apple documentation highlights that objects that are equal must have the same10hash value:11https://developer.apple.com/documentation/objectivec/1418956-nsobject/1418795-isequal?language=objc12 13Note that the check only verifies the presence of ``-hash`` in scenarios where14its omission could result in unexpected behavior. The verification of the15implementation of ``-hash`` is the responsibility of the developer, e.g.,16through the addition of unit tests to verify the implementation.17