complete-member-access.m revision ff5ce6eefc7c253ef6edf4d4bfc996fdd82d09aa
155385fe3e723cd675001e45f42d61adde6b7f075Douglas Gregor/* Note: the RUN lines are near the end of the file, since line/column 255385fe3e723cd675001e45f42d61adde6b7f075Douglas Gregor matter for this test. */ 395ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor 495ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor@protocol MyProtocol 595ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor@property float ProtoProp; 695ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor@end 795ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor 895ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor@interface Super { 995ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor int SuperIVar; 1095ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor} 1195ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor@end 1295ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor@interface Int : Super<MyProtocol> 1395ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor{ 1495ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor int IVar; 1595ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor} 1695ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor 1795ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor@property int prop1; 1895ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor@end 1995ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor 2095ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregorvoid test_props(Int* ptr) { 2195ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor ptr.prop1 = 0; 2295ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor ptr->IVar = 0; 2395ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor} 2495ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor 2595ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor// RUN: c-index-test -code-completion-at=%s:21:7 %s | FileCheck -check-prefix=CHECK-CC1 %s 26ff5ce6eefc7c253ef6edf4d4bfc996fdd82d09aaDouglas Gregor// CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText prop1} 27ff5ce6eefc7c253ef6edf4d4bfc996fdd82d09aaDouglas Gregor// CHECK-CC1: ObjCPropertyDecl:{ResultType float}{TypedText ProtoProp} 2895ac6556a5dfc504491103c37f9aa05b303d2729Douglas Gregor// RUN: c-index-test -code-completion-at=%s:22:8 %s | FileCheck -check-prefix=CHECK-CC2 %s 29ff5ce6eefc7c253ef6edf4d4bfc996fdd82d09aaDouglas Gregor// CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText IVar} 30ff5ce6eefc7c253ef6edf4d4bfc996fdd82d09aaDouglas Gregor// CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText SuperIVar} 31