mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-19 12:05:50 +00:00
Migrate QueryableVarDef to indicies
This commit is contained in:
parent
fffb3d3fcc
commit
59c7d96ea7
15
src/query.cc
15
src/query.cc
@ -103,16 +103,11 @@ QueryableVarDef::DefUpdate MapIdToUsr(const IdMap& id_map, const IndexedVarDef::
|
|||||||
QueryableVarDef::DefUpdate result(def.usr);
|
QueryableVarDef::DefUpdate result(def.usr);
|
||||||
result.short_name = def.short_name;
|
result.short_name = def.short_name;
|
||||||
result.qualified_name = def.qualified_name;
|
result.qualified_name = def.qualified_name;
|
||||||
if (def.declaration)
|
result.declaration = id_map.ToQuery(def.declaration);
|
||||||
result.declaration = MapIdToUsr(id_map, def.declaration.value());
|
result.definition_spelling = id_map.ToQuery(def.definition_spelling);
|
||||||
if (def.definition_spelling)
|
result.definition_extent = id_map.ToQuery(def.definition_extent);
|
||||||
result.definition_spelling = MapIdToUsr(id_map, def.definition_spelling.value());
|
result.variable_type = id_map.ToQuery(def.variable_type);
|
||||||
if (def.definition_extent)
|
result.declaring_type = id_map.ToQuery(def.declaring_type);
|
||||||
result.definition_extent = MapIdToUsr(id_map, def.definition_extent.value());
|
|
||||||
if (def.variable_type)
|
|
||||||
result.variable_type = MapIdToUsr(id_map, def.variable_type.value());
|
|
||||||
if (def.declaring_type)
|
|
||||||
result.declaring_type = MapIdToUsr(id_map, def.declaring_type.value());
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ struct QueryableFuncDef {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct QueryableVarDef {
|
struct QueryableVarDef {
|
||||||
using DefUpdate = VarDefDefinitionData<Usr, Usr, Usr, QueryableLocation>;
|
using DefUpdate = VarDefDefinitionData<QueryTypeId, QueryFuncId, QueryVarId, QueryableLocation>;
|
||||||
using UsesUpdate = MergeableUpdate<QueryableLocation>;
|
using UsesUpdate = MergeableUpdate<QueryableLocation>;
|
||||||
|
|
||||||
DefUpdate def;
|
DefUpdate def;
|
||||||
|
Loading…
Reference in New Issue
Block a user