summaryrefslogtreecommitdiffstats
path: root/clang/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
commitb78139f74d71fdd5a0f6ad6adf9600fe05d03506 (patch)
treef6944b91a7c11cbfc01bc6cab3e7e146d47919be /clang/lib/Index/ASTLocation.cpp
parent153d418def535cd5419d81cf1f61d78783a29016 (diff)
downloadbcm5719-llvm-b78139f74d71fdd5a0f6ad6adf9600fe05d03506.tar.gz
bcm5719-llvm-b78139f74d71fdd5a0f6ad6adf9600fe05d03506.zip
Handle references from ObjCIvarRefExprs.
llvm-svn: 76507
Diffstat (limited to 'clang/lib/Index/ASTLocation.cpp')
-rw-r--r--clang/lib/Index/ASTLocation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Index/ASTLocation.cpp b/clang/lib/Index/ASTLocation.cpp
index e869707f4d2..55a90fad8dc 100644
--- a/clang/lib/Index/ASTLocation.cpp
+++ b/clang/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))
OpenPOWER on IntegriCloud