llvm-project/clang/lib/Index
Alex Hoppen a3a8a1a15b [Index] Ignore nullptr decls for indexing
We can end up with a call to `indexTopLevelDecl(D)` with `D == nullptr` in non-assert builds e.g. when indexing a module in `indexModule` and
- `ASTReader::GetDecl` returns `nullptr` if `Index >= DeclsLoaded.size()`, thus returning `nullptr`
=> `ModuleDeclIterator::operator*` returns `nullptr`
=> we call `IndexCtx.indexTopLevelDecl` with `nullptr`

Be resilient and just ignore the `nullptr` decls during indexing.

Reviewed By: akyrtzi

Differential Revision: https://reviews.llvm.org/D102001
2021-05-06 13:12:26 -07:00
..
CMakeLists.txt Index: Remove unused internal header SimpleFormatContext.h, NFC 2020-12-04 15:10:27 -08:00
CommentToXML.cpp Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
FileIndexRecord.cpp [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
FileIndexRecord.h [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
IndexBody.cpp [clang][index] report references from unreslovedLookupExpr. 2021-02-11 11:08:26 +01:00
IndexDecl.cpp [Index] Ignore nullptr decls for indexing 2021-05-06 13:12:26 -07:00
IndexSymbol.cpp [clang][Index] Introduce a TemplateParm SymbolKind 2020-02-14 13:20:34 +01:00
IndexTypeSourceInfo.cpp [clang] Do not consider the template arguments of bases to be bases themselves 2020-09-01 19:18:03 -04:00
IndexingAction.cpp [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
IndexingContext.cpp [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
IndexingContext.h [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00
USRGeneration.cpp [index] Improve macro indexing support 2021-04-06 09:12:14 -07:00