Skip to content

Commit 8d4a055

Browse files
authored
Merge pull request #2934 from ahoppen/pr-stable/ignore-nullptr-decl-for-indexing
[Index] Ignore nullptr decls for indexing
2 parents 799bd79 + f5202d5 commit 8d4a055

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Index/IndexDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ bool IndexingContext::indexDeclContext(const DeclContext *DC) {
759759
}
760760

761761
bool IndexingContext::indexTopLevelDecl(const Decl *D) {
762-
if (D->getLocation().isInvalid())
762+
if (!D || D->getLocation().isInvalid())
763763
return true;
764764

765765
if (isa<ObjCMethodDecl>(D))

0 commit comments

Comments
 (0)