[clang-tools-extra] clangd: Make callHierarchy follow inheritance (PR #163024)

via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 17 01:04:33 PDT 2025


================
@@ -94,6 +106,9 @@ class MemIndex : public SymbolIndex {
   static_assert(sizeof(RelationKind) == sizeof(uint8_t),
                 "RelationKind should be of same size as a uint8_t");
   llvm::DenseMap<std::pair<SymbolID, uint8_t>, std::vector<SymbolID>> Relations;
+  // Reverse relations, currently only for OverridenBy
+  llvm::DenseMap<std::pair<SymbolID, uint8_t>, std::vector<SymbolID>>
----------------
timon-ul wrote:

I guess after thinking about this a bit more my preference probably would be:

- we already know of a feature that would need to extend this map -> keep it the way it is
- we do not have any idea yet what feature could extend this map but we expect it -> remove the RelationsKind
- we do not have any idea what feature could extend this map and we do not expect it -> be more specific

But I would love to hear your thoughts on this.

https://github.com/llvm/llvm-project/pull/163024


More information about the cfe-commits mailing list