complete-synthesized.m revision 591dbc7b0c0b1fcfccb9256e6d71d57a0ba967c1
1// Note: this test is line- and column-sensitive. Test commands are at 2// the end. 3 4 5@interface A 6@property int prop1; 7@end 8 9@interface B : A { 10 float _prop2; 11} 12@property float prop2; 13@property short prop3; 14@end 15 16@interface B () 17@property double prop4; 18@end 19 20@implementation B 21@synthesize prop2 = _prop2; 22 23- (int)method { 24 return _prop2; 25} 26 27@dynamic prop3; 28 29- (short)method2 { 30 return _prop4; 31} 32 33- (short)method3 { 34 return prop3; 35} 36@end 37 38// We use -fgnu-runtime to portably force the use of the non-fragile ABI. 39 40// RUN: c-index-test -code-completion-at=%s:24:1 -fgnu-runtime -fobjc-default-synthesize-properties %s | FileCheck %s 41// RUN: c-index-test -code-completion-at=%s:30:2 -fgnu-runtime -fobjc-default-synthesize-properties %s | FileCheck %s 42// RUN: c-index-test -code-completion-at=%s:34:2 -fgnu-runtime -fobjc-default-synthesize-properties %s | FileCheck %s 43 44// CHECK: NotImplemented:{TypedText _Bool} (50) 45// CHECK: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35) 46// CHECK-NOT: prop2 47// CHECK-NOT: prop3 48// CHECK: ObjCIvarDecl:{ResultType double}{TypedText _prop4} (37) 49