summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/IndexBody.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-05-16 00:50:02 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-05-16 00:50:02 +0000
commitb7e4367fefab1ffb85c5f1b0dddb163933dc3cae (patch)
tree14ecc5e62d72c91e54a9e2dbb4c23196c058da19 /clang/tools/libclang/IndexBody.cpp
parent3bcf4b5cc7c260a8786f1785efcf6debe0e10442 (diff)
downloadbcm5719-llvm-b7e4367fefab1ffb85c5f1b0dddb163933dc3cae.tar.gz
bcm5719-llvm-b7e4367fefab1ffb85c5f1b0dddb163933dc3cae.zip
[libclang/AST] Index references of protocols in "@protocol(...)" syntax.
To do that, keep track of the location of the protocol id in the ObjCProtocolExpr AST node. rdar://11190837 llvm-svn: 156890
Diffstat (limited to 'clang/tools/libclang/IndexBody.cpp')
-rw-r--r--clang/tools/libclang/IndexBody.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/tools/libclang/IndexBody.cpp b/clang/tools/libclang/IndexBody.cpp
index 9a829f8580c..acf88389409 100644
--- a/clang/tools/libclang/IndexBody.cpp
+++ b/clang/tools/libclang/IndexBody.cpp
@@ -90,6 +90,12 @@ public:
return true;
}
+ bool VisitObjCProtocolExpr(ObjCProtocolExpr *E) {
+ IndexCtx.handleReference(E->getProtocol(), E->getProtocolIdLoc(),
+ Parent, ParentDC, E, CXIdxEntityRef_Direct);
+ return true;
+ }
+
bool VisitObjCBoxedExpr(ObjCBoxedExpr *E) {
if (ObjCMethodDecl *MD = E->getBoxingMethod())
IndexCtx.handleReference(MD, E->getLocStart(),
OpenPOWER on IntegriCloud