aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/ASTLocation.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-21 00:05:38 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-21 00:05:38 +0000
commit80ede1d7148582b7647d7cbe09c86e3305976839 (patch)
tree854536012f2e37d5d14e3237a4fb4fe2c5336517 /lib/Index/ASTLocation.cpp
parentec930d3d816d69d2e8bee857de276e68beda1a07 (diff)
Handle references from ObjCIvarRefExprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index/ASTLocation.cpp')
-rw-r--r--lib/Index/ASTLocation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Index/ASTLocation.cpp b/lib/Index/ASTLocation.cpp
index e869707f4d..55a90fad8d 100644
--- a/lib/Index/ASTLocation.cpp
+++ b/lib/Index/ASTLocation.cpp
@@ -16,6 +16,7 @@
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/Expr.h"
+#include "clang/AST/ExprObjC.h"
using namespace clang;
using namespace idx;
@@ -24,6 +25,9 @@ static Decl *getDeclFromExpr(Stmt *E) {
return RefExpr->getDecl();
if (MemberExpr *ME = dyn_cast<MemberExpr>(E))
return ME->getMemberDecl();
+ if (ObjCIvarRefExpr *RE = dyn_cast<ObjCIvarRefExpr>(E))
+ return RE->getDecl();
+
if (CallExpr *CE = dyn_cast<CallExpr>(E))
return getDeclFromExpr(CE->getCallee());
if (CastExpr *CE = dyn_cast<CastExpr>(E))