1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambucint bar; 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc@interface I 6*f4a2713aSLionel Sambuc{ 7*f4a2713aSLionel Sambuc int _bar; 8*f4a2713aSLionel Sambuc} 9*f4a2713aSLionel Sambuc@property int PROP; 10*f4a2713aSLionel Sambuc@property int PROP1; 11*f4a2713aSLionel Sambuc@property int PROP2; 12*f4a2713aSLionel Sambuc@property int PROP3; 13*f4a2713aSLionel Sambuc@property int PROP4; 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc@property int bar; 16*f4a2713aSLionel Sambuc@property int bar1; 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc@end 19*f4a2713aSLionel Sambuc 20*f4a2713aSLionel Sambuc@implementation I 21*f4a2713aSLionel Sambuc- (int) Meth { return _PROP; } 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc@dynamic PROP1; 24*f4a2713aSLionel Sambuc- (int) Meth1 { return PROP1; } // expected-error {{use of undeclared identifier 'PROP1'}} 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc- (int) Meth2 { return PROP2; } // expected-error {{use of undeclared identifier 'PROP2'}} 27*f4a2713aSLionel Sambuc@dynamic PROP2; 28*f4a2713aSLionel Sambuc 29*f4a2713aSLionel Sambuc- (int) Meth3 { return PROP3; } // expected-error {{use of undeclared identifier 'PROP3'}} 30*f4a2713aSLionel Sambuc@synthesize PROP3=IVAR; 31*f4a2713aSLionel Sambuc 32*f4a2713aSLionel Sambuc- (int) Meth4 { return PROP4; } 33*f4a2713aSLionel Sambuc@synthesize PROP4=PROP4; // expected-note 4 {{'PROP4' declared here}} 34*f4a2713aSLionel Sambuc 35*f4a2713aSLionel Sambuc- (int) Meth5 { return bar; } 36*f4a2713aSLionel Sambuc@synthesize bar = _bar; 37*f4a2713aSLionel Sambuc 38*f4a2713aSLionel Sambuc- (int) Meth6 { return _bar1; } 39*f4a2713aSLionel Sambuc 40*f4a2713aSLionel Sambuc@end 41*f4a2713aSLionel Sambuc 42*f4a2713aSLionel Sambuc@implementation I(CAT) 43*f4a2713aSLionel Sambuc- (int) Meth { return PROP1; } // expected-error {{use of undeclared identifier 'PROP1'}} 44*f4a2713aSLionel Sambuc@end 45*f4a2713aSLionel Sambuc 46*f4a2713aSLionel Sambuc@implementation I(r8251648) 47*f4a2713aSLionel Sambuc- (int) Meth1: (int) bar { 48*f4a2713aSLionel Sambuc return bar; 49*f4a2713aSLionel Sambuc} 50*f4a2713aSLionel Sambuc@end 51