summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/IndexingContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/IndexingContext.cpp')
-rw-r--r--clang/tools/libclang/IndexingContext.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp
index 23d8e7e5696..11b2ed3c352 100644
--- a/clang/tools/libclang/IndexingContext.cpp
+++ b/clang/tools/libclang/IndexingContext.cpp
@@ -369,7 +369,10 @@ bool IndexingContext::handleObjCInterface(const ObjCInterfaceDecl *D) {
markEntityOccurrenceInFile(SuperD, SuperLoc);
}
- ObjCProtocolListInfo ProtInfo(D->getReferencedProtocols(), *this, SA);
+ ObjCProtocolList EmptyProtoList;
+ ObjCProtocolListInfo ProtInfo(D->hasDefinition()? D->getReferencedProtocols()
+ : EmptyProtoList,
+ *this, SA);
ObjCInterfaceDeclInfo InterInfo(D);
InterInfo.ObjCProtoListInfo = ProtInfo.getListInfo();
OpenPOWER on IntegriCloud