1*67e74705SXin Li@interface I 2*67e74705SXin Li@property (readonly) id prop; 3*67e74705SXin Li -(id)prop; 4*67e74705SXin Li@end 5*67e74705SXin Li 6*67e74705SXin Li@interface I() 7*67e74705SXin Li@property (assign,readwrite) id prop; 8*67e74705SXin Li@end 9*67e74705SXin Li 10*67e74705SXin Li@implementation I 11*67e74705SXin Li@synthesize prop = _prop; 12*67e74705SXin Li@end 13*67e74705SXin Li 14*67e74705SXin Li// rdar://11015325 15*67e74705SXin Li@interface I1 16*67e74705SXin Li__attribute__((something)) @interface I2 @end 17*67e74705SXin Li@end 18*67e74705SXin Li 19*67e74705SXin Li@interface I3 20*67e74705SXin Li@property (assign,readwrite) id auto_prop; 21*67e74705SXin Li@end 22*67e74705SXin Li 23*67e74705SXin Li@implementation I3 24*67e74705SXin Li-(void)meth { 25*67e74705SXin Li _auto_prop = 0; 26*67e74705SXin Li} 27*67e74705SXin Li@end 28*67e74705SXin Li 29*67e74705SXin Liint test1() { 30*67e74705SXin Li extern int extvar; 31*67e74705SXin Li extvar = 2; 32*67e74705SXin Li extern int extfn(); 33*67e74705SXin Li return extfn(); 34*67e74705SXin Li} 35*67e74705SXin Li 36*67e74705SXin Li@interface I4 37*67e74705SXin Li@property (assign, nonatomic) id prop; 38*67e74705SXin Li-(id)prop; 39*67e74705SXin Li-(void)setProp:(id)p; 40*67e74705SXin Li@end 41*67e74705SXin Li 42*67e74705SXin Li@implementation I4 43*67e74705SXin Li@synthesize prop = _prop; 44*67e74705SXin Li-(id)prop { 45*67e74705SXin Li return 0; 46*67e74705SXin Li} 47*67e74705SXin Li-(void)setProp:(id)p { 48*67e74705SXin Li} 49*67e74705SXin Li@end 50*67e74705SXin Li 51*67e74705SXin Li// rdar://25372906 52*67e74705SXin Li@class I5; 53*67e74705SXin Li@interface I5 54*67e74705SXin Li-(void)meth; 55*67e74705SXin Li@end 56*67e74705SXin Li 57*67e74705SXin Li// RUN: c-index-test -index-file %s -target x86_64-apple-macosx10.7 > %t 58*67e74705SXin Li// RUN: FileCheck %s -input-file=%t 59*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-class | name: I | {{.*}} | loc: 1:12 60*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-instance-method | name: prop | {{.*}} | loc: 3:2 61*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-property | name: prop | {{.*}} | loc: 2:25 62*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-category | name: | {{.*}} | loc: 6:12 63*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-instance-method | name: setProp: | {{.*}} | loc: 7:33 64*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-property | name: prop | {{.*}} | loc: 7:33 65*67e74705SXin Li 66*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-ivar | name: _prop | {{.*}} | loc: 11:20 67*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-instance-method | name: prop | {{.*}} | loc: 11:13 | {{.*}} | lexical-container: [I:10:17] 68*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-instance-method | name: setProp: | {{.*}} | loc: 11:13 | {{.*}} | lexical-container: [I:10:17] 69*67e74705SXin Li 70*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-ivar | name: _auto_prop | {{.*}} | loc: 20:33 71*67e74705SXin Li// CHECK: [indexEntityReference]: kind: objc-ivar | name: _auto_prop | {{.*}} | loc: 25:3 72*67e74705SXin Li 73*67e74705SXin Li// CHECK: [indexDeclaration]: kind: function | name: test1 | {{.*}} | loc: 29:5 74*67e74705SXin Li// CHECK: [indexDeclaration]: kind: variable | name: extvar | {{.*}} | loc: 30:14 75*67e74705SXin Li// CHECK: [indexEntityReference]: kind: variable | name: extvar | {{.*}} | loc: 31:3 76*67e74705SXin Li// CHECK: [indexDeclaration]: kind: function | name: extfn | {{.*}} | loc: 32:14 77*67e74705SXin Li// CHECK: [indexEntityReference]: kind: function | name: extfn | {{.*}} | loc: 33:10 78*67e74705SXin Li 79*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-class | name: I4 | {{.*}} | loc: 36:12 80*67e74705SXin Li// CHECK: [indexEntityReference]: kind: objc-property | name: prop | {{.*}} | cursor: ObjCSynthesizeDecl=prop:37:34 (Definition) | loc: 43:13 | <parent>:: kind: objc-class | name: I4 | {{.*}} | container: [I4:42:17] | refkind: direct 81*67e74705SXin Li// CHECK-NOT: [indexDeclaration]: kind: objc-instance-method {{.*}} loc: 37: 82*67e74705SXin Li// CHECK-NOT: [indexDeclaration]: kind: objc-instance-method {{.*}} loc: 43: 83*67e74705SXin Li 84*67e74705SXin Li// CHECK: [indexDeclaration]: kind: objc-instance-method | name: meth | {{.*}} loc: 54:1 | {{.*}} | isRedecl: 0 | isDef: 0 | 85