sammccall accepted this revision.
sammccall added a comment.

Still LG



================
Comment at: clang-tools-extra/clangd/index/FileIndex.h:165
+  /// Returns absolute paths for all files that has a shard.
+  std::vector<PathRef> getAllFiles() const;
+
----------------
kadircet wrote:
> sammccall wrote:
> > I do find it a little weird not to expose the map-structure of the vast 
> > majority of the data here.
> > 
> > What steers you away from just making this a function
> > `StringMap<X> shardIndexToFile(IndexFileIn, PathRef)`
> > where X could be `File` with a method to obtain the data, or the more 
> > anonymous `unique_function<IndexFileIn()>`?
> because the map structure is just pointers into the `IndexFileIn`, I wanted 
> to make sure those pointers do not outlive the IndexFileIn.
I don't think it's unreasonable to have a non-owning data structure with a 
comment, but up to you.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77732



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

Reply via email to