[PATCH] D59407: [clangd] Add RelationSlab

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 28 18:14:53 PDT 2019


nridge added a comment.

@sammccall, thank you for having a look at this.

I have no objection to revising the data model if there's agreement on a better one.

In D59407#1446464 <https://reviews.llvm.org/D59407#1446464>, @sammccall wrote:

> - I don't think we yet know what the more resource-critical (denser) relations and queries are, so it's unclear what to optimize for


Based on a brief mental survey of C++ IDE features I'm familiar with, I can think of the following additional uses of the relations capability:

- A call hierarchy feature (which is also proposed for LSP <https://github.com/Microsoft/language-server-protocol/issues/468>, with client <https://github.com/theia-ide/theia/issues/3765> and server <https://github.com/Microsoft/vscode-languageserver-node/pull/420> implementation efforts) would need every caller-callee relationship to be recorded in the index (`RelationCalledBy`).
- Given a virtual method declaration, a user may want to see a list of implementations (overriders) and navigate to one or more of them. This would need every overrider relationship to be recorded in the index (`RelationOverrideOf`).

Intuitively, it seems like `RelationOverrideOf` would be slightly denser than `RelationChildOf` (though not by much), while `RelationCalledBy` would be significantly denser. In terms of queries, I believe the key for lookups for both of the above would be a (subject, predicate) pair, just like for subtypes.

Does that change your analysis at all?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59407/new/

https://reviews.llvm.org/D59407





More information about the cfe-commits mailing list