Based on the relevant Clang source code and a couple of quick tests, it seems that the analyzer does not look at ivars that are not both declared in the @interface
and marked @private
.
@interface Igloo : NSObject
{
NSString * address; // No warning
@private
NSInteger radius; // Warning
}
@end
@implementation Igloo
{
NSInteger numWindows; // No warning
@private // Has no real effect, of course; just testing
NSString * doormatText; // No warning
}
@end
I suggest filing a bug/submitting a patch.