[clang-tools-extra] [clangd] Add background index format support to clangd-indexer (PR #175209)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 16 00:48:31 PST 2026


================
@@ -35,8 +35,9 @@ namespace clang {
 namespace clangd {
 
 enum class IndexFileFormat {
-  RIFF, // Versioned binary format, suitable for production use.
-  YAML, // Human-readable format, suitable for experiments and debugging.
+  RIFF,      // Versioned binary format, suitable for production use.
+  YAML,      // Human-readable format, suitable for experiments and debugging.
+  BACKGROUND // Background index format, suitable for language server use.
----------------
JVApen wrote:

I understand why you pick 'background' as name, though I find it quite confusing while reading. I'm wondering if there are alternative names. For example: shards. Looking at the code that reads the shards (readIndexFile) it can both be riff and YAML. Not sure if we can write both. Though if so, I would expect this to be a separate flag.

https://github.com/llvm/llvm-project/pull/175209


More information about the cfe-commits mailing list