Skip to content

Commit 3d2cf72

Browse files
committed
[clangd] Fix the background index is not disabled when using remote-index.
Differential Revision: https://reviews.llvm.org/D85637
1 parent cb3a598 commit 3d2cf72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang-tools-extra/clangd/tool/ClangdMain.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,6 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var
682682
if (!ResourceDir.empty())
683683
Opts.ResourceDir = ResourceDir;
684684
Opts.BuildDynamicSymbolIndex = EnableIndex;
685-
Opts.BackgroundIndex = EnableBackgroundIndex;
686685
std::unique_ptr<SymbolIndex> StaticIdx;
687686
std::future<void> AsyncIndexLoad; // Block exit while loading the index.
688687
if (EnableIndex && !IndexFile.empty()) {
@@ -713,6 +712,7 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var
713712
}
714713
}
715714
#endif
715+
Opts.BackgroundIndex = EnableBackgroundIndex;
716716
Opts.StaticIndex = StaticIdx.get();
717717
Opts.AsyncThreadsCount = WorkerThreadsCount;
718718
Opts.BuildRecoveryAST = RecoveryAST;

0 commit comments

Comments
 (0)