1// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2// expected-no-diagnostics
3
4/* This test is for categories which don't implement the accessors but some accessors are
5   implemented in their base class implementation. In this case,no warning must be issued.
6*/
7
8@interface MyClass
9{
10    int        _foo;
11}
12@property(readonly)    int        foo;
13@end
14
15@implementation MyClass
16- (int) foo        { return _foo; }
17@end
18
19@interface MyClass (private)
20@property(readwrite)    int        foo;
21@end
22
23@implementation MyClass (private)
24- (void) setFoo:(int)foo    { _foo = foo; }
25@end
26
27@interface MyClass (public)
28@property(readwrite)    int        foo;
29@end
30
31@implementation MyClass (public)
32@end
33
34// rdar://12568064
35// No warn of unimplemented property of protocols in category,
36// when those properties will be implemented in category's primary
37// class or one of its super classes.
38@interface HBSuperclass
39@property (nonatomic) char myProperty;
40@property (nonatomic) char myProperty2;
41@end
42
43@interface HBClass : HBSuperclass
44@end
45
46@protocol HBProtocol
47@property (nonatomic) char myProperty;
48@property (nonatomic) char myProperty2;
49@end
50
51@interface HBSuperclass (HBSCategory)<HBProtocol>
52@end
53
54@implementation HBSuperclass (HBSCategory)
55@end
56
57@interface HBClass (HBCategory)<HBProtocol>
58@end
59
60@implementation HBClass (HBCategory)
61@end
62