blob: 2502d7705b9c7a715761b96af11533570e02e78d [file] [log] [blame]
Douglas Gregor55385fe2009-11-18 04:19:12 +00001/* Note: the RUN lines are near the end of the file, since line/column
2 matter for this test. */
Douglas Gregor95ac6552009-11-18 01:29:26 +00003
4@protocol MyProtocol
5@property float ProtoProp;
6@end
7
8@interface Super {
9 int SuperIVar;
10}
11@end
12@interface Int : Super<MyProtocol>
13{
14 int IVar;
15}
16
17@property int prop1;
18@end
19
20void test_props(Int* ptr) {
21 ptr.prop1 = 0;
22 ptr->IVar = 0;
23}
24
25// RUN: c-index-test -code-completion-at=%s:21:7 %s | FileCheck -check-prefix=CHECK-CC1 %s
Douglas Gregorff5ce6e2009-12-18 18:53:37 +000026// CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText prop1}
27// CHECK-CC1: ObjCPropertyDecl:{ResultType float}{TypedText ProtoProp}
Douglas Gregor95ac6552009-11-18 01:29:26 +000028// RUN: c-index-test -code-completion-at=%s:22:8 %s | FileCheck -check-prefix=CHECK-CC2 %s
Douglas Gregorff5ce6e2009-12-18 18:53:37 +000029// CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText IVar}
30// CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText SuperIVar}