================ @@ -2272,18 +2273,14 @@ incomingCalls(const CallHierarchyItem &Item, const SymbolIndex *Index) { // Initially store the ranges in a map keyed by SymbolID of the caller. // This allows us to group different calls with the same caller // into the same CallHierarchyIncomingCall. - llvm::DenseMap<SymbolID, std::vector<Range>> CallsIn; + llvm::DenseMap<SymbolID, std::vector<SymbolLocation>> CallsIn; // We can populate the ranges based on a refs request only. As we do so, we // also accumulate the container IDs into a lookup request. LookupRequest ContainerLookup; Index->refs(Request, [&](const Ref &R) { - auto Loc = indexToLSPLocation(R.Location, Item.uri.file()); - if (!Loc) { - elog("incomingCalls failed to convert location: {0}", Loc.takeError()); - return; - } - auto It = CallsIn.try_emplace(R.Container, std::vector<Range>{}).first; - It->second.push_back(Loc->range); + auto It = + CallsIn.try_emplace(R.Container, std::vector<SymbolLocation>{}).first; + It->second.push_back(R.Location); ---------------- hokein wrote:
Yeah, I think it is fine for in-memory index, it is not safe for other implementations (e.g. remote index). https://github.com/llvm/llvm-project/pull/111616 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits