Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeCompletion] Show protocol properties that are accessed through q…
…ualified 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
- Loading branch information
Showing
2 changed files
with
36 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |