diff --git a/src/messages/cquery_call_tree.cc b/src/messages/cquery_call_tree.cc index a8266385..3b3dfbb1 100644 --- a/src/messages/cquery_call_tree.cc +++ b/src/messages/cquery_call_tree.cc @@ -76,27 +76,6 @@ std::vector BuildExpandCallTree( if (!root_func.def) return {}; - auto format_location = [&]( - const lsLocation& location, - optional declaring_type) -> std::string { - std::string base; - - if (declaring_type) { - QueryType type = db->types[declaring_type->id]; - if (type.def) - base = type.def->detailed_name; - } - - if (base.empty()) { - base = location.uri.GetPath(); - size_t last_index = base.find_last_of('/'); - if (last_index != std::string::npos) - base = base.substr(last_index + 1); - } - - return base + ":" + std::to_string(location.range.start.line + 1); - }; - std::vector result; std::unordered_set seen_locations; @@ -131,9 +110,7 @@ std::vector BuildExpandCallTree( return; Out_CqueryCallTree::CallEntry call_entry; - call_entry.name = - call_func.def->short_name + " (" + - format_location(*call_location, call_func.def->declaring_type) + ")"; + call_entry.name = call_func.def->short_name; call_entry.usr = call_func.usr; call_entry.location = *call_location; call_entry.hasCallers = HasCallersOnSelfOrBaseOrDerived(db, call_func);