gribozavr added inline comments.
================ Comment at: clang-tools-extra/clangd/index/Index.cpp:35 + auto *Array = Arena.Allocate<SymbolID>(Rels.size()); + std::uninitialized_copy(Rels.begin(), Rels.end(), Array); + Result.emplace_back(Entry.first, ---------------- Use `ArrayRef::copy()`, for example: https://reviews.llvm.org/D58782 ================ Comment at: clang-tools-extra/clangd/index/Index.h:43 +public: + using value_type = std::pair<RelationKey, llvm::ArrayRef<SymbolID>>; + using const_iterator = std::vector<value_type>::const_iterator; ---------------- `struct Relation`? And in the comments for it, please explain which way the relationship is directed (is the SymbolID in the key the subtype? or is the SymbolID in the ArrayRef the subtype?). ================ Comment at: clang-tools-extra/clangd/index/Index.h:88 + size_t NumRelations = 0; +}; + ---------------- Please move all new declarations into `Relation.h`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59407/new/ https://reviews.llvm.org/D59407 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits