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

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 22 23:15:17 PDT 2026


================
@@ -141,6 +275,13 @@ int main(int argc, const char **argv) {
 
   $ clangd-indexer File1.cpp File2.cpp ... FileN.cpp > clangd.dex
 
+  Example usage for sharded index (writes shards to disk):
+
+  $ clangd-indexer --index-type=sharded --executor=all-TUs build/
----------------
HighCommander4 wrote:

Use `build/compile_commands.json` rather than `build/` in the example.

(I checked and `build/` happens to work, but only because it ends in a trailing slash; `build` without a trailing slash doesn't work. That seems like an artifact in the implementation of the all-TUs executor, not something we should be encouraging users to rely on.)

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


More information about the cfe-commits mailing list