ioeric added inline comments.

================
Comment at: clangd/index/FileIndex.h:47
+  // The shared_ptr keeps the symbols alive.
+  std::shared_ptr<SymbolIndex> buildMemIndex();
 
----------------
Maybe avoid hardcoding the index name, so that we could potentially switch to 
use a different index implementation?

We might also want to allow user to specify different index implementations for 
file index e.g. main file dynamic index might prefer MemIndex while Dex might 
be a better choice for the preamble index. 


================
Comment at: clangd/index/MemIndex.h:30
+  /// Builds an index from a slab. The shared_ptr manages the slab's lifetime.
+  static std::shared_ptr<SymbolIndex> build(SymbolSlab Slab);
 
----------------
(It's a bit unfortunate that this has to return `shared_ptr` now)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51422



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to