diff options
Diffstat (limited to 'tools/libclang/IndexDecl.cpp')
-rw-r--r-- | tools/libclang/IndexDecl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/libclang/IndexDecl.cpp b/tools/libclang/IndexDecl.cpp index 777dea1d15..0970054575 100644 --- a/tools/libclang/IndexDecl.cpp +++ b/tools/libclang/IndexDecl.cpp @@ -109,6 +109,9 @@ public: bool VisitObjCImplementationDecl(ObjCImplementationDecl *D) { const ObjCInterfaceDecl *Class = D->getClassInterface(); + if (!Class) + return true; + if (Class->isImplicitInterfaceDecl()) IndexCtx.handleObjCInterface(Class); @@ -128,7 +131,8 @@ public: } bool VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) { - if (D->getCategoryDecl()->getLocation().isInvalid()) + const ObjCCategoryDecl *Cat = D->getCategoryDecl(); + if (!Cat) return true; IndexCtx.handleObjCCategoryImpl(D); |