mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 01:21:57 +00:00
fix crash
This commit is contained in:
parent
a19d4f732f
commit
aef8e9267f
@ -9,9 +9,9 @@
|
|||||||
-IC:/Program Files/LLVM/include
|
-IC:/Program Files/LLVM/include
|
||||||
|
|
||||||
# Use libcxx
|
# Use libcxx
|
||||||
-stdlib=libc++
|
#-stdlib=libc++
|
||||||
-nostdinc++
|
#-nostdinc++
|
||||||
-IC:/Users/jacob/Desktop/superindex/indexer/libcxx/include
|
#-IC:/Users/jacob/Desktop/superindex/indexer/libcxx/include
|
||||||
#-fms-compatibility
|
#-fms-compatibility
|
||||||
#-fdelayed-template-parsing
|
#-fdelayed-template-parsing
|
||||||
|
|
||||||
|
@ -113,7 +113,14 @@ QueryableVarDef::DefUpdate MapIdToUsr(const IdCache& id_cache, const VarDefDefin
|
|||||||
QueryableFile::QueryableFile(const IndexedFile& indexed)
|
QueryableFile::QueryableFile(const IndexedFile& indexed)
|
||||||
: file_id(indexed.path) {
|
: file_id(indexed.path) {
|
||||||
|
|
||||||
FileId local_file_id = indexed.id_cache.file_path_to_file_id.find(indexed.path)->second;
|
auto it = indexed.id_cache.file_path_to_file_id.find(indexed.path);
|
||||||
|
if (it == indexed.id_cache.file_path_to_file_id.end()) {
|
||||||
|
// TODO: investigate
|
||||||
|
std::cerr << "Unable to find cached file " << indexed.path << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
FileId local_file_id = it->second;
|
||||||
auto add_outline = [this, &indexed, local_file_id](Usr usr, Location location) {
|
auto add_outline = [this, &indexed, local_file_id](Usr usr, Location location) {
|
||||||
if (location.file_id() == local_file_id)
|
if (location.file_id() == local_file_id)
|
||||||
outline.push_back(UsrRef(usr, MapIdToUsr(indexed.id_cache, location)));
|
outline.push_back(UsrRef(usr, MapIdToUsr(indexed.id_cache, location)));
|
||||||
|
Loading…
Reference in New Issue
Block a user