[PATCH] D49658: [clangd] Index Interfaces for Xrefs

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 1 06:59:26 PDT 2018


ilya-biryukov added a comment.

Picking it up since @sammccall is OOO.

> Implementing all index operations in the patch would be end up with a large patch, I intend to split the patch as small as possible. Let's scope this patch to interface only.

LG as interface-only patch. just a few nits



================
Comment at: clangd/index/Index.h:288
+  Unknown = 0,
+  Declaration = static_cast<uint8_t>(index::SymbolRole::Declaration),
+  Definition = static_cast<uint8_t>(index::SymbolRole::Definition),
----------------
Any strong reason to keep the values in sync with `SymbolRole`?
It intention is to have tricky conversions (i.e. apply a bit mask and cast to the other type)?


================
Comment at: clangd/index/Merge.cpp:81
+                           Callback) const override {
+    log("findOccurrences is not implemented.");
+  }
----------------
It's not intended to be called, right?
If that's the case let's `assert(false)` here. Having those statements does not seem too useful.



Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D49658





More information about the cfe-commits mailing list