summaryrefslogtreecommitdiff
path: root/lib/Index/IndexBody.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-29 16:25:46 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-29 16:25:46 +0000
commitb5aee35cc5d62f11d98539f62e4fe63f0ac9edc6 (patch)
tree3e6ab962dbc73cfe1445a60d2eb4dfba7c939a22 /lib/Index/IndexBody.cpp
parentaa803409c3bd3930126db630c29f63d42f255153 (diff)
Notes
Diffstat (limited to 'lib/Index/IndexBody.cpp')
-rw-r--r--lib/Index/IndexBody.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Index/IndexBody.cpp b/lib/Index/IndexBody.cpp
index efa5ed85d60bb..d3632b8b9b15f 100644
--- a/lib/Index/IndexBody.cpp
+++ b/lib/Index/IndexBody.cpp
@@ -254,6 +254,18 @@ public:
SymbolRoleSet Roles = getRolesForRef(E, Relations);
return IndexCtx.handleReference(E->getExplicitProperty(), E->getLocation(),
Parent, ParentDC, Roles, Relations, E);
+ } else if (const ObjCMethodDecl *Getter = E->getImplicitPropertyGetter()) {
+ // Class properties that are explicitly defined using @property
+ // declarations are represented implicitly as there is no ivar for class
+ // properties.
+ if (Getter->isClassMethod()) {
+ if (const auto *PD = Getter->getCanonicalDecl()->findPropertyDecl()) {
+ SmallVector<SymbolRelation, 2> Relations;
+ SymbolRoleSet Roles = getRolesForRef(E, Relations);
+ return IndexCtx.handleReference(PD, E->getLocation(), Parent,
+ ParentDC, Roles, Relations, E);
+ }
+ }
}
// No need to do a handleReference for the objc method, because there will