Index: clang-tools-extra/clangd/FileDistance.h =================================================================== --- clang-tools-extra/clangd/FileDistance.h +++ clang-tools-extra/clangd/FileDistance.h @@ -63,7 +63,7 @@ }; // Supports lookups to find the minimum distance to a file from any source. -// This object should be reused, it memoizes intermediate computations. +// This object should be reused, it memorizes intermediate computations. class FileDistance { public: static constexpr unsigned Unreachable = std::numeric_limits::max(); @@ -86,6 +86,8 @@ // comparison on the bodies. class URIDistance { public: + // Memorizes paths from \p Sources and builds efficient structure for URI + // distance computations. \p Sources must contain absolute paths, not URIs. URIDistance(llvm::StringMap Sources, const FileDistanceOptions &Opts = {}) : Sources(Sources), Opts(Opts) {}