http://llvm.org/bugs/show_bug.cgi?id=14842
Bug #: 14842
Summary: Warn when -isEqual: is overridden without
corresponding -hash override
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Overriding -isEqual: to provide custom equality checking without a
corresponding -hash override to ensure that equal objects always have the same
hash can result in subtle bugs involving NSSet and NSDictionary membership. For
more details, see
http://www.mikeash.com/pyblog/friday-qa-2012-12-14-objective-c-pitfalls.html
It would be handy if the Clang static analyzer warned in such cases.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs