diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-10-28 22:18:22 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-10-28 22:18:22 +0000 |
commit | e8ec699167a7c3a2872feefd03e0ea2fabb980e0 (patch) | |
tree | 9c6a53a26c98d54c7abc40c8a8492c501f1d685a /test/Analysis/unused-ivars.m | |
parent | 27d20a24a1b816cecbd142727d2c81af5a6a111b (diff) |
Unused ivars checker: also check methods in categories that are defined in the same translation unit. Fixes <rdar://problem/6260004>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85442 91177308-0d34-0410-b5e6-96231b3b80d8
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 aacd44e7e6..9e9360da50 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 + |