diff options
Diffstat (limited to 'test/Analysis/unused-ivars.m')
-rw-r--r-- | test/Analysis/unused-ivars.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Analysis/unused-ivars.m b/test/Analysis/unused-ivars.m index aacd44e7e677..9e9360da50c6 100644 --- a/test/Analysis/unused-ivars.m +++ b/test/Analysis/unused-ivars.m @@ -43,3 +43,25 @@ b(); } @end + +//===----------------------------------------------------------------------===// +// <rdar://problem/6260004> Detect that ivar is in use, if used in category +// in the same file as the implementation +//===----------------------------------------------------------------------===// + +@protocol Protocol6260004 +- (id) getId; +@end + +@interface RDar6260004 { +@private + id x; // no-warning +} +@end +@implementation RDar6260004 @end +@implementation RDar6260004 (Protocol6260004) +- (id) getId { + return x; +} +@end + |