aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-05-06 19:08:57 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-05-06 19:08:57 +0000
commit1270673bf5208a140b397419c8c34e7bdcce2339 (patch)
treef5a259ac155edaba28c99f6d8fe826122208a8f0 /tools
parent00ffb8079b14cade816d8f668675e853e613dee0 (diff)
Have the RecursiveASTVisitor traverse the type source info of an objc class message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/libclang/IndexBody.cpp3
-rw-r--r--tools/libclang/RecursiveASTVisitor.h5
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/libclang/IndexBody.cpp b/tools/libclang/IndexBody.cpp
index 54711e6332..02ab885e62 100644
--- a/tools/libclang/IndexBody.cpp
+++ b/tools/libclang/IndexBody.cpp
@@ -68,9 +68,6 @@ public:
}
bool VisitObjCMessageExpr(ObjCMessageExpr *E) {
- if (TypeSourceInfo *Cls = E->getClassReceiverTypeInfo())
- IndexCtx.indexTypeSourceInfo(Cls, Parent, ParentDC);
-
if (ObjCMethodDecl *MD = E->getMethodDecl())
IndexCtx.handleReference(MD, E->getSelectorStartLoc(),
Parent, ParentDC, E,
diff --git a/tools/libclang/RecursiveASTVisitor.h b/tools/libclang/RecursiveASTVisitor.h
index dd2c836d9c..e45545ed1a 100644
--- a/tools/libclang/RecursiveASTVisitor.h
+++ b/tools/libclang/RecursiveASTVisitor.h
@@ -2116,7 +2116,10 @@ DEF_TRAVERSE_STMT(ObjCEncodeExpr, {
})
DEF_TRAVERSE_STMT(ObjCIsaExpr, { })
DEF_TRAVERSE_STMT(ObjCIvarRefExpr, { })
-DEF_TRAVERSE_STMT(ObjCMessageExpr, { })
+DEF_TRAVERSE_STMT(ObjCMessageExpr, {
+ if (TypeSourceInfo *TInfo = S->getClassReceiverTypeInfo())
+ TRY_TO(TraverseTypeLoc(TInfo->getTypeLoc()));
+})
DEF_TRAVERSE_STMT(ObjCPropertyRefExpr, { })
DEF_TRAVERSE_STMT(ObjCSubscriptRefExpr, { })
DEF_TRAVERSE_STMT(ObjCProtocolExpr, { })