ioeric added inline comments.
Herald added a subscriber: kadircet.

================
Comment at: clang-tools-extra/clangd/index/Index.h:360
+ template <typename T>
+ static std::unique_ptr<SymbolIndex> build(SymbolSlab Slab) {
+   struct Snapshot {
----------------
I'd try to avoid this pattern as it implicitly requires 
`T::build(std::shared_ptr<std::vector<const Symbol *>>)` to be implemented. 
Alternatively, you could pull out a helper function that turns a `SymbolSlab` 
into `std::shared_ptr<std::vector<const Symbol *>>`, which can be shared by 
different indexes. It can probably live in `MemIndex.h`.


https://reviews.llvm.org/D50897



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

Reply via email to