[PATCH] D59092: [clangd] Deduplicate Refs on the fly.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 08:08:26 PST 2019


kadircet accepted this revision.
kadircet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clangd/index/Ref.cpp:44
 
 RefSlab RefSlab::Builder::build() && {
   // We can reuse the arena, as it only has unique strings and we need them all.
----------------
Can you add a comment saying that references will be ordered?


================
Comment at: clangd/indexer/IndexerMain.cpp:59
                  for (const auto &Sym : S) {
-                   // No need to merge as currently all Refs are from main file.
                    for (const auto &Ref : Sym.second)
----------------
instead of just deleting let's mention that it de-duplicates during insertion.


Repository:
  rCTE Clang Tools Extra

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

https://reviews.llvm.org/D59092





More information about the cfe-commits mailing list