Previously the ObjC Dealloc Checker only checked classes with ivars, not retained properties, which caused three bugs:
- False positive warnings about a missing -dealloc method in classes with only ivars. (rdar://problem/6074390&6244594)
- Missing warnings about a missing -dealloc method on classes with only properties. (rdar://problem/13089741)
- Missing warnings about an over-released or under-released ivar associated with a retained property in classes with only properties. (rdar://problem/8154447)
The fix is to check only classes with at least one retained, synthesized, writable property.
This also exposed a bug when reporting an over-released or under-released property that did not contain a synthesize statement. The checker tried to associate the warning with an @synthesize statement that did not exist, which caused an assertion failure in debug builds. The fix is to fall back to the @property statement in this case.
This should use isObjCRetainableType, to handle blocks as well.