aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/IndexBody.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-18 15:50:50 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-18 15:50:50 +0000
commitaca19be8731fc31cff68702de0dc7f30ce908979 (patch)
treea855dddb91eca1455fe966640dda8faa28bf437a /tools/libclang/IndexBody.cpp
parentc0f5b754eacfd0d1cb5338e048850e5d29ca42f7 (diff)
[libclang] Index implicit property references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/IndexBody.cpp')
-rw-r--r--tools/libclang/IndexBody.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/libclang/IndexBody.cpp b/tools/libclang/IndexBody.cpp
index b2ffb99267..769a1c7ae8 100644
--- a/tools/libclang/IndexBody.cpp
+++ b/tools/libclang/IndexBody.cpp
@@ -69,6 +69,21 @@ public:
IndexCtx.handleReference(MD, E->getSelectorStartLoc(), 0, ParentDC, E);
return true;
}
+
+ bool VisitObjCPropertyRefExpr(ObjCPropertyRefExpr *E) {
+ if (E->isImplicitProperty()) {
+ if (ObjCMethodDecl *MD = E->getImplicitPropertyGetter())
+ IndexCtx.handleReference(MD, E->getLocation(), 0, ParentDC, E,
+ CXIdxEntityRef_ImplicitProperty);
+ if (ObjCMethodDecl *MD = E->getImplicitPropertySetter())
+ IndexCtx.handleReference(MD, E->getLocation(), 0, ParentDC, E,
+ CXIdxEntityRef_ImplicitProperty);
+ } else {
+ IndexCtx.handleReference(E->getExplicitProperty(), E->getLocation(), 0,
+ ParentDC, E);
+ }
+ return true;
+ }
};
} // anonymous namespace