[PATCH] D49658: [clangd] Index Interfaces for Xrefs
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 6 03:13:42 PDT 2018
hokein marked 2 inline comments as done.
hokein added inline comments.
================
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),
----------------
ilya-biryukov wrote:
> 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)?
Yeah, this is intended. Our goal here is to align with `clang::index` library as much as possible rather than diverge too far from it, because we will end up using index-while-build.
================
Comment at: clangd/index/Merge.cpp:81
+ Callback) const override {
+ log("findOccurrences is not implemented.");
+ }
----------------
ilya-biryukov wrote:
> 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.
>
I'm not sure `assert(false)` is a good fit here, I think this is just a note reminding us that it is not implemented. Anyway, it is a matter of personal taste here.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D49658
More information about the cfe-commits
mailing list