1 // RUN: %clang_cc1 -fsyntax-only -Wunused-property-ivar -verify -Wno-objc-root-class %s
4 @interface NSObject @end
6 @interface Example : NSObject
7 @property (nonatomic, copy) id t; // expected-note {{property declared here}}
8 @property (nonatomic, copy) id u; // expected-note {{property declared here}}
9 @property (nonatomic, copy) id v; // expected-note {{property declared here}}
10 @property (nonatomic, copy) id w;
11 @property (nonatomic, copy) id x; // expected-note {{property declared here}}
12 @property (nonatomic, copy) id y; // expected-note {{property declared here}}
13 @property (nonatomic, copy) id z;
14 @property (nonatomic, copy) id ok;
17 @implementation Example
18 - (void) setX:(id)newX { // expected-warning {{ivar '_x' which backs the property is not referenced in this property's accessor}}
21 - (id) y { // expected-warning {{ivar '_y' which backs the property is not referenced in this property's accessor}}
25 - (void) setV:(id)newV { // expected-warning {{ivar '_v' which backs the property is not referenced in this property's accessor}}
29 // No warning here because there is no backing ivar.
30 // both setter/getter are user defined.
31 - (void) setW:(id)newW {
38 - (id) u { // expected-warning {{ivar '_u' which backs the property is not referenced in this property's accessor}}
42 @synthesize ok = okIvar;
43 - (void) setOk:(id)newOk {
47 @synthesize t = tIvar;
48 - (void) setT:(id)newT { // expected-warning {{ivar 'tIvar' which backs the property is not referenced in this property's accessor}}
55 @interface CalDAVServerVersion {
56 BOOL _supportsTimeRangeFilterWithoutEndDate;
58 @property (nonatomic, readonly,nonatomic) BOOL supportsTimeRangeFilterWithoutEndDate;
61 @interface CalDAVConcreteServerVersion : CalDAVServerVersion {
65 @interface CalendarServerVersion : CalDAVConcreteServerVersion
68 @implementation CalDAVServerVersion
69 @synthesize supportsTimeRangeFilterWithoutEndDate=_supportsTimeRangeFilterWithoutEndDate;
72 @implementation CalendarServerVersion
73 -(BOOL)supportsTimeRangeFilterWithoutEndDate {