diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-11-18 01:29:26 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-11-18 01:29:26 +0000 |
commit | 95ac6556a5dfc504491103c37f9aa05b303d2729 (patch) | |
tree | 08e817bd4c6cdb7a5d97db9037929918df5308f8 /test | |
parent | a14cd1111f5daf6891be4f3c9e534a75b5ce6294 (diff) |
Code completion for member accesses that involve Objective-C properties and instance variables
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Index/complete-member-access.m | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Index/complete-member-access.m b/test/Index/complete-member-access.m new file mode 100644 index 0000000000..94ba8e60c7 --- /dev/null +++ b/test/Index/complete-member-access.m @@ -0,0 +1,30 @@ +// Note: the RUN lines are near the end of the file, since line/column +// matter for this test. + +@protocol MyProtocol +@property float ProtoProp; +@end + +@interface Super { + int SuperIVar; +} +@end +@interface Int : Super<MyProtocol> +{ + int IVar; +} + +@property int prop1; +@end + +void test_props(Int* ptr) { + ptr.prop1 = 0; + ptr->IVar = 0; +} + +// RUN: c-index-test -code-completion-at=%s:21:7 %s | FileCheck -check-prefix=CHECK-CC1 %s +// CHECK-CC1: ObjCPropertyDecl:{TypedText prop1} +// CHECK-CC1: ObjCPropertyDecl:{TypedText ProtoProp} +// RUN: c-index-test -code-completion-at=%s:22:8 %s | FileCheck -check-prefix=CHECK-CC2 %s +// CHECK-CC2: ObjCIvarDecl:{TypedText IVar} +// CHECK-CC2: ObjCIvarDecl:{TypedText SuperIVar} |