aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/direct-synthesized-ivar-access.m
blob: 4dedafc29ed1db6211c57a61b411445947c1b694 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clang_cc1 -Wnonfragile-abi2 -fsyntax-only -fobjc-nonfragile-abi2 -fobjc-default-synthesize-properties -verify %s
// rdar://8673791

@interface I {
}

@property int IVAR; // expected-note {{property declared here}}
- (int) OK;
@end

@implementation I
- (int) Meth { return IVAR; } // expected-warning {{direct access of synthesized ivar by using property access 'IVAR'}}
- (int) OK { return self.IVAR; }
@end