[PATCH] D68981: [clangd] Use our own relation kind.

Haojian Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 07:30:14 PDT 2019


hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/index/MemIndex.h:72
   // A map from (subject, predicate) pair to objects.
-  llvm::DenseMap<std::pair<SymbolID, index::SymbolRole>, std::vector<SymbolID>>
+  llvm::DenseMap<std::pair<SymbolID, RelationKind>, std::vector<SymbolID>>
       Relations;
----------------
kadircet wrote:
> can we rather use `uint8_t` in here instead of `RelationKind` to get rid of the `DenseMapInfo` specialization completely?
Yes, done.


================
Comment at: clang-tools-extra/clangd/index/Relation.h:22
 
+enum class RelationKind : uint8_t {
+  BaseOf,
----------------
kadircet wrote:
> is this clang-formatted ?
yes, note that I'm leaving a trailing "," on purpose, to prevent clang-format the whole structure into one-line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68981





More information about the llvm-commits mailing list