Index: clang-tools-extra/clangd/index/Serialization.h =================================================================== --- clang-tools-extra/clangd/index/Serialization.h +++ clang-tools-extra/clangd/index/Serialization.h @@ -40,14 +40,15 @@ YAML, // Human-readable format, suitable for experiments and debugging. }; -// Holds the contents of an index file that was read. +/// Holds the contents of an index file that was read. struct IndexFileIn { llvm::Optional Symbols; }; -// Parse an index file. The input must be a RIFF container chunk. +/// Parse an index file. The input must be a RIFF container chunk or YAML symbol +/// collection. llvm::Expected readIndexFile(llvm::StringRef); -// Specifies the contents of an index file to be written. +/// Specifies the contents of an index file to be written. struct IndexFileOut { const SymbolSlab *Symbols; // TODO: Support serializing symbol occurrences. @@ -58,16 +59,16 @@ IndexFileOut(const IndexFileIn &I) : Symbols(I.Symbols ? I.Symbols.getPointer() : nullptr) {} }; -// Serializes an index file. +/// Serializes an index file. llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const IndexFileOut &O); std::string toYAML(const Symbol &); -// Returned symbol is backed by the YAML input. +/// Returned symbol is backed by the YAML input. // FIXME: this is only needed for IndexerMain, find a better solution. llvm::Expected symbolFromYAML(llvm::yaml::Input &); -// Build an in-memory static index from an index file. -// The size should be relatively small, so data can be managed in memory. +/// Build an in-memory static index from an index file. +/// The size should be relatively small, so data can be managed in memory. std::unique_ptr loadIndex(llvm::StringRef Filename, llvm::ArrayRef URISchemes, bool UseDex = true);