summaryrefslogtreecommitdiffstats
path: root/lib/Index/IndexDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Index/IndexDecl.cpp')
-rw-r--r--lib/Index/IndexDecl.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Index/IndexDecl.cpp b/lib/Index/IndexDecl.cpp
index 6c5b2e520e..7d60aad389 100644
--- a/lib/Index/IndexDecl.cpp
+++ b/lib/Index/IndexDecl.cpp
@@ -289,11 +289,12 @@ public:
bool VisitObjCCategoryDecl(const ObjCCategoryDecl *D) {
const ObjCInterfaceDecl *C = D->getClassInterface();
- if (C)
- TRY_TO(IndexCtx.handleReference(C, D->getLocation(), D, D,
- SymbolRoleSet(), SymbolRelation{
- (unsigned)SymbolRole::RelationExtendedBy, D
- }));
+ if (!C)
+ return true;
+ TRY_TO(IndexCtx.handleReference(C, D->getLocation(), D, D, SymbolRoleSet(),
+ SymbolRelation{
+ (unsigned)SymbolRole::RelationExtendedBy, D
+ }));
SourceLocation CategoryLoc = D->getCategoryNameLoc();
if (!CategoryLoc.isValid())
CategoryLoc = D->getLocation();