Allow resolving headers from a PCH even after headers+PCH were moved to another path.
[clang.git] / test / Index / complete-properties.m
blob0a19f11133455a447f99050771b68badf9865680
1 /* Note: the RUN lines are near the end of the file, since line/column
2  matter for this test. */
4 @interface I1 
6   id StoredProp3;
7   int RandomIVar;
9 @property int Prop0;
10 @property int Prop1;
11 @property float Prop2;
12 @end
14 @interface I2 : I1
15 @property id Prop3;
16 @property id Prop4;
17 @end
19 @implementation I2
20 @synthesize Prop2, Prop1, Prop3 = StoredProp3;
21 @dynamic Prop4;
22 @end
24 @interface I3 : I2
25 @property id Prop3;
26 @end
28 id test(I3 *i3) {
29   return i3.Prop3;
32 // RUN: c-index-test -code-completion-at=%s:20:13 %s | FileCheck -check-prefix=CHECK-CC1 %s
33 // CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText Prop0}
34 // CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText Prop1}
35 // CHECK-CC1: ObjCPropertyDecl:{ResultType float}{TypedText Prop2}
36 // CHECK-CC1: ObjCPropertyDecl:{ResultType id}{TypedText Prop3}
37 // CHECK-CC1: ObjCPropertyDecl:{ResultType id}{TypedText Prop4}
38 // RUN: c-index-test -code-completion-at=%s:20:20 %s | FileCheck -check-prefix=CHECK-CC2 %s
39 // CHECK-CC2: ObjCPropertyDecl:{ResultType int}{TypedText Prop0}
40 // CHECK-CC2: ObjCPropertyDecl:{ResultType int}{TypedText Prop1}
41 // CHECK-CC2-NEXT: ObjCPropertyDecl:{ResultType id}{TypedText Prop3}
42 // CHECK-CC2: ObjCPropertyDecl:{ResultType id}{TypedText Prop4}
43 // RUN: c-index-test -code-completion-at=%s:20:35 %s | FileCheck -check-prefix=CHECK-CC3 %s
44 // CHECK-CC3: ObjCIvarDecl:{ResultType int}{TypedText RandomIVar}
45 // CHECK-CC3: ObjCIvarDecl:{ResultType id}{TypedText StoredProp3}
46 // RUN: c-index-test -code-completion-at=%s:21:10 %s | FileCheck -check-prefix=CHECK-CC4 %s
47 // CHECK-CC4: ObjCPropertyDecl:{ResultType int}{TypedText Prop0}
48 // CHECK-CC4-NEXT: ObjCPropertyDecl:{ResultType id}{TypedText Prop4}
50 // RUN: c-index-test -code-completion-at=%s:29:13 %s | FileCheck -check-prefix=CHECK-CC5 %s
51 // CHECK-CC5: ObjCPropertyDecl:{ResultType int}{TypedText Prop0} (35)
52 // CHECK-CC5-NEXT: ObjCPropertyDecl:{ResultType int}{TypedText Prop1} (35)
53 // CHECK-CC5-NEXT: ObjCPropertyDecl:{ResultType float}{TypedText Prop2} (35)
54 // CHECK-CC5-NEXT: ObjCPropertyDecl:{ResultType id}{TypedText Prop3} (35)
55 // CHECK-CC5-NEXT: ObjCPropertyDecl:{ResultType id}{TypedText Prop4} (35)