diff options
Diffstat (limited to 'clang/lib/Index/IndexDecl.cpp')
-rw-r--r-- | clang/lib/Index/IndexDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Index/IndexDecl.cpp b/clang/lib/Index/IndexDecl.cpp index 2ba323e..00adb36 100644 --- a/clang/lib/Index/IndexDecl.cpp +++ b/clang/lib/Index/IndexDecl.cpp @@ -759,7 +759,7 @@ bool IndexingContext::indexDeclContext(const DeclContext *DC) { } bool IndexingContext::indexTopLevelDecl(const Decl *D) { - if (D->getLocation().isInvalid()) + if (!D || D->getLocation().isInvalid()) return true; if (isa<ObjCMethodDecl>(D)) |