CXIdxObjCContainerKind kind;
} CXIdxObjCContainerDeclInfo;
-typedef struct {
- const CXIdxObjCContainerDeclInfo *containerInfo;
- const CXIdxEntityInfo *objcClass;
- CXCursor classCursor;
- CXIdxLoc classLoc;
-} CXIdxObjCCategoryDeclInfo;
-
typedef struct {
const CXIdxEntityInfo *base;
CXCursor cursor;
const CXIdxObjCProtocolRefListInfo *protocols;
} CXIdxObjCInterfaceDeclInfo;
+typedef struct {
+ const CXIdxObjCContainerDeclInfo *containerInfo;
+ const CXIdxEntityInfo *objcClass;
+ CXCursor classCursor;
+ CXIdxLoc classLoc;
+ const CXIdxObjCProtocolRefListInfo *protocols;
+} CXIdxObjCCategoryDeclInfo;
+
typedef struct {
const CXIdxDeclInfo *declInfo;
const CXIdxBaseClassInfo *const *bases;
ProtInfo = dyn_cast<ObjCProtocolDeclInfo>(DI))
return &ProtInfo->ObjCProtoRefListInfo;
+ if (const ObjCCategoryDeclInfo *CatInfo = dyn_cast<ObjCCategoryDeclInfo>(DI))
+ return CatInfo->ObjCCatDeclInfo.protocols;
+
return 0;
}
if (suppressRefs())
markEntityOccurrenceInFile(IFaceD, ClassLoc);
+ ObjCProtocolListInfo ProtInfo(D->getReferencedProtocols(), *this, SA);
+
CatDInfo.ObjCCatDeclInfo.containerInfo = &CatDInfo.ObjCContDeclInfo;
if (IFaceD) {
CatDInfo.ObjCCatDeclInfo.objcClass = &ClassEntity;
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);
}
CatDInfo.ObjCCatDeclInfo.classCursor = clang_getNullCursor();
}
CatDInfo.ObjCCatDeclInfo.classLoc = getIndexLoc(ClassLoc);
+ CatDInfo.ObjCCatDeclInfo.protocols = 0;
+
return handleObjCContainer(D, CategoryLoc, getCursor(D), CatDInfo);
}
struct ObjCCategoryDeclInfo : public ObjCContainerDeclInfo {
CXIdxObjCCategoryDeclInfo ObjCCatDeclInfo;
+ CXIdxObjCProtocolRefListInfo ObjCProtoListInfo;
explicit ObjCCategoryDeclInfo(bool isImplementation)
: ObjCContainerDeclInfo(Info_ObjCCategory,