This revision was automatically updated to reflect the committed changes. Closed by commit rGa3a8a1a15b52: [Index] Ignore nullptr decls for indexing (authored by ahoppen, committed by akyrtzi).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102001/new/ https://reviews.llvm.org/D102001 Files: clang/lib/Index/IndexDecl.cpp Index: clang/lib/Index/IndexDecl.cpp =================================================================== --- clang/lib/Index/IndexDecl.cpp +++ clang/lib/Index/IndexDecl.cpp @@ -759,7 +759,7 @@ } bool IndexingContext::indexTopLevelDecl(const Decl *D) { - if (D->getLocation().isInvalid()) + if (!D || D->getLocation().isInvalid()) return true; if (isa<ObjCMethodDecl>(D))
Index: clang/lib/Index/IndexDecl.cpp =================================================================== --- clang/lib/Index/IndexDecl.cpp +++ clang/lib/Index/IndexDecl.cpp @@ -759,7 +759,7 @@ } bool IndexingContext::indexTopLevelDecl(const Decl *D) { - if (D->getLocation().isInvalid()) + if (!D || D->getLocation().isInvalid()) return true; if (isa<ObjCMethodDecl>(D))
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits