diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-16 00:50:02 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-16 00:50:02 +0000 |
commit | b7e4367fefab1ffb85c5f1b0dddb163933dc3cae (patch) | |
tree | 14ecc5e62d72c91e54a9e2dbb4c23196c058da19 /clang/tools/libclang/IndexBody.cpp | |
parent | 3bcf4b5cc7c260a8786f1785efcf6debe0e10442 (diff) | |
download | bcm5719-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.cpp | 6 |
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(), |