[PATCH] D97535: [clangd] Use URIs instead of paths in the index file list

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 26 09:18:50 PST 2021


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:279
       SymbolSlabs.push_back(FileAndSymbols.second);
+      for (const auto &S : *FileAndSymbols.second) {
+        if (S.Definition)
----------------
iterating over all the symbols here (and refs below) seems really unfortunate. But looking at the previous discussions that seems to be best of both worlds until we populate a file list in SymbolCollector. However, I think it would be better to do the looping after releasing the lock (we already have the information copied over to our snapshots).

moreover we seem to be still inserting keys of the Symbol and RefSlabs into Files, but not doing that for RelationSlabs, why? (i believe we shouldn't be inserting the keys at all, if we indeed want to just insert URIs and keep treating the keys as opaque objects).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97535



More information about the cfe-commits mailing list