[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / SemaObjC / property-category-impl.m
blob997949778c6e3208eafc36eb9774a3856a6769e9
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 /* This test is for categories which don't implement the accessors but some accessors are
4    implemented in their base class implementation. In this case,no warning must be issued.
5 */
7 @interface MyClass 
9     int        _foo;
11 @property(readonly)    int        foo;
12 @end
14 @implementation MyClass
15 - (int) foo        { return _foo; }
16 @end
18 @interface MyClass (private)
19 @property(readwrite)    int        foo;
20 @end
22 @implementation MyClass (private)
23 - (void) setFoo:(int)foo    { _foo = foo; }
24 @end
26 @interface MyClass (public)
27 @property(readwrite)    int        foo; // expected-warning {{property 'foo' requires method 'setFoo:' to be defined }}
28 @end
30 @implementation MyClass (public)// expected-note {{implementation is here}}
31 @end