diff options
author | Jordan Rose <jordan_rose@apple.com> | 2016-03-11 21:14:40 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2016-03-11 21:14:40 +0000 |
commit | d5289358c5bb380994446d62e4b8609aa531a31f (patch) | |
tree | b590c46c605612aa3b2dd1a3722764b0c373bcd6 /test/CodeCompletion | |
parent | d5ee7cc60f74ecd29eed4fe362733aecca772b0b (diff) |
Fix ObjCMethodDecl::findPropertyDecl for class properties.
This affects code completion and a few other things; hopefully the code completion
test is sufficient to catch regressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263295 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeCompletion')
-rw-r--r-- | test/CodeCompletion/documentation.m | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeCompletion/documentation.m b/test/CodeCompletion/documentation.m new file mode 100644 index 0000000000..47add5b6ca --- /dev/null +++ b/test/CodeCompletion/documentation.m @@ -0,0 +1,25 @@ +// Note: the run lines follow their respective tests, since line/column +// matter in this test. + +@interface Base +@end + +@interface Test : Base +/// Instance! +@property id instanceProp; +/// Class! +@property (class) id classProp; +@end + +void test(Test *obj) { + [obj instanceProp]; + [Test classProp]; +} + +// RUN: %clang_cc1 -fsyntax-only -code-completion-brief-comments -code-completion-at=%s:15:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s +// CHECK-CC1: instanceProp : [#id#]instanceProp : Instance! +// CHECK-CC1: setInstanceProp: : [#void#]setInstanceProp:<#(id)#> : Instance! + +// RUN: %clang_cc1 -fsyntax-only -code-completion-brief-comments -code-completion-at=%s:16:9 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s +// CHECK-CC2: classProp : [#id#]classProp : Class! +// CHECK-CC2: setClassProp: : [#void#]setClassProp:<#(id)#> : Class! |