diff options
| author | Alex Lorenz <arphaman@gmail.com> | 2016-10-12 11:40:15 +0000 |
|---|---|---|
| committer | Alex Lorenz <arphaman@gmail.com> | 2016-10-12 11:40:15 +0000 |
| commit | 06cfa99268ecab69900300c237e010d01a0db881 (patch) | |
| tree | 0f444c94eb0b955d3fa9bed3731feec07efee192 /clang/test/CodeCompletion | |
| parent | a9fcc1d2a437e75907572c5a765a933e679ae5a9 (diff) | |
| download | bcm5719-llvm-06cfa99268ecab69900300c237e010d01a0db881.tar.gz bcm5719-llvm-06cfa99268ecab69900300c237e010d01a0db881.zip | |
[CodeCompletion] Show protocol properties that are accessed through qualified id
This commit improves code completion for properties that are declared in
Objective-C protocols by making sure that properties show up in completions
when they are accessed through a qualified id.
rdar://24426041
Differential Revision: https://reviews.llvm.org/D25436
llvm-svn: 284007
Diffstat (limited to 'clang/test/CodeCompletion')
| -rw-r--r-- | clang/test/CodeCompletion/objc-protocol-member-access.m | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/CodeCompletion/objc-protocol-member-access.m b/clang/test/CodeCompletion/objc-protocol-member-access.m new file mode 100644 index 00000000000..0ed55387e3d --- /dev/null +++ b/clang/test/CodeCompletion/objc-protocol-member-access.m @@ -0,0 +1,24 @@ +// Note: the run lines follow their respective tests, since line/column +// matter in this test. + +@protocol Bar +@property (readonly) int bar; +@end + +@protocol Foo <Bar> + +@property (nonatomic, readonly) int foo; +- (void)foobar: (int)x; + +@end + +int getFoo(id object) { + id<Foo> modelObject = (id<Foo>)object; + int foo = modelObject.; + return foo; +} + +// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:17:25 %s -o - | FileCheck %s +// CHECK: bar : [#int#]bar +// CHECK: foo : [#int#]foo +// CHECK-NOT: foobar |

