summaryrefslogtreecommitdiffstats
path: root/test/Index/complete-synthesized.m
blob: 1a4858449f427524be9f751db6e57960426869b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Note: this test is line- and column-sensitive. Test commands are at
// the end.


@interface A
@property int prop1;
@end

@interface B : A {
  float _prop2;
}
@property float prop2;
@property short prop3;
@end

@interface B ()
@property double prop4;
@end

@implementation B
@synthesize prop2 = _prop2;

- (int)method {
  return _prop2;
}

@dynamic prop3;

- (short)method2 {
  return prop4;
}

- (short)method3 {
  return prop3;
}
@end

// RUN: c-index-test -code-completion-at=%s:24:1 -Xclang -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-CC1 %s
// CHECK-CC1: NotImplemented:{TypedText _Bool} (50)
// CHECK-CC1: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35)
// CHECK-CC1-NOT: prop2
// CHECK-CC1: ObjCPropertyDecl:{ResultType short}{TypedText prop3} (35)
// CHECK-CC1: ObjCPropertyDecl:{ResultType double}{TypedText prop4} (35)

// RUN: c-index-test -code-completion-at=%s:30:2 -Xclang -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-CC2 %s
// CHECK-CC2: NotImplemented:{TypedText _Bool} (50)
// CHECK-CC2: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35)
// CHECK-CC2-NOT: prop3
// CHECK-CC2: ObjCPropertyDecl:{ResultType double}{TypedText prop4} (35)

// RUN: c-index-test -code-completion-at=%s:34:2 -Xclang -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-CC3 %s
// CHECK-CC3: NotImplemented:{TypedText _Bool} (50)
// CHECK-CC3: ObjCIvarDecl:{ResultType float}{TypedText _prop2} (35)
// CHECK-CC3: ObjCPropertyDecl:{ResultType double}{TypedText prop4}
// CHECK-CC3-NOT: ObjCPropertyDecl:{ResultType double}{TypedText prop4} (35)
// CHECK-CC1: restrict
OpenPOWER on IntegriCloud