diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-23 20:27:26 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-23 20:27:26 +0000 |
commit | 37f40572c4c78a8c57a7b45266f8b86db172a7c1 (patch) | |
tree | 453704e8a6b69639f39b4eeeff13cec1df9d9657 /tools/libclang/IndexDecl.cpp | |
parent | a6d81f9a2d236ae21491455f649ea765123f6fc7 (diff) |
[libclang] Indexing API: Fix issues, mostly C++ related.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145107 91177308-0d34-0410-b5e6-96231b3b80d8
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); |