summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/IndexingContext.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-13 18:47:45 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-13 18:47:45 +0000
commit9b9f7a9f7a44d2726abbf88d10bcfe49891b74fd (patch)
tree0d338cf145d5a715f4420e690dbe1ace921a91b1 /clang/tools/libclang/IndexingContext.cpp
parent25cb0ff3d851537fd3eb4e725bace7dbb2a69678 (diff)
downloadbcm5719-llvm-9b9f7a9f7a44d2726abbf88d10bcfe49891b74fd.tar.gz
bcm5719-llvm-9b9f7a9f7a44d2726abbf88d10bcfe49891b74fd.zip
[libclang] Indexing API: Provide the protocols list for objc categories as well.
rdar://10573361 llvm-svn: 146498
Diffstat (limited to 'clang/tools/libclang/IndexingContext.cpp')
-rw-r--r--clang/tools/libclang/IndexingContext.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp
index 66e552c8f47..812669397d4 100644
--- a/clang/tools/libclang/IndexingContext.cpp
+++ b/clang/tools/libclang/IndexingContext.cpp
@@ -383,6 +383,8 @@ bool IndexingContext::handleObjCCategory(const ObjCCategoryDecl *D) {
if (suppressRefs())
markEntityOccurrenceInFile(IFaceD, ClassLoc);
+ ObjCProtocolListInfo ProtInfo(D->getReferencedProtocols(), *this, SA);
+
CatDInfo.ObjCCatDeclInfo.containerInfo = &CatDInfo.ObjCContDeclInfo;
if (IFaceD) {
CatDInfo.ObjCCatDeclInfo.objcClass = &ClassEntity;
@@ -393,6 +395,9 @@ bool IndexingContext::handleObjCCategory(const ObjCCategoryDecl *D) {
CatDInfo.ObjCCatDeclInfo.classCursor = clang_getNullCursor();
}
CatDInfo.ObjCCatDeclInfo.classLoc = getIndexLoc(ClassLoc);
+ CatDInfo.ObjCProtoListInfo = ProtInfo.getListInfo();
+ CatDInfo.ObjCCatDeclInfo.protocols = &CatDInfo.ObjCProtoListInfo;
+
return handleObjCContainer(D, CategoryLoc, getCursor(D), CatDInfo);
}
@@ -416,6 +421,8 @@ bool IndexingContext::handleObjCCategoryImpl(const ObjCCategoryImplDecl *D) {
CatDInfo.ObjCCatDeclInfo.classCursor = clang_getNullCursor();
}
CatDInfo.ObjCCatDeclInfo.classLoc = getIndexLoc(ClassLoc);
+ CatDInfo.ObjCCatDeclInfo.protocols = 0;
+
return handleObjCContainer(D, CategoryLoc, getCursor(D), CatDInfo);
}
OpenPOWER on IntegriCloud