diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -355,6 +355,9 @@ InputStyle = JSONStreamStyle::Delimited; LogLevel = Logger::Verbose; PrettyPrint = true; + // Disable background index on lit tests by default to prevent disk writes. + if (!EnableBackgroundIndex.getNumOccurrences()) + EnableBackgroundIndex = false; // Ensure background index makes progress. BackgroundQueue::preventThreadStarvationInTests(); }