Author: Haojian Wu
Date: 2020-08-10T14:02:22+02:00
New Revision: 3d2cf72943295d167062b54e663e2f5236df2c5d

URL: 
https://github.com/llvm/llvm-project/commit/3d2cf72943295d167062b54e663e2f5236df2c5d
DIFF: 
https://github.com/llvm/llvm-project/commit/3d2cf72943295d167062b54e663e2f5236df2c5d.diff

LOG: [clangd] Fix the background index is not disabled when using remote-index.

Differential Revision: https://reviews.llvm.org/D85637

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp 
b/clang-tools-extra/clangd/tool/ClangdMain.cpp
index daf87d11c384..484ece01b6c9 100644
--- a/clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -682,7 +682,6 @@ clangd accepts flags on the commandline, and in the 
CLANGD_FLAGS environment var
   if (!ResourceDir.empty())
     Opts.ResourceDir = ResourceDir;
   Opts.BuildDynamicSymbolIndex = EnableIndex;
-  Opts.BackgroundIndex = EnableBackgroundIndex;
   std::unique_ptr<SymbolIndex> StaticIdx;
   std::future<void> AsyncIndexLoad; // Block exit while loading the index.
   if (EnableIndex && !IndexFile.empty()) {
@@ -713,6 +712,7 @@ clangd accepts flags on the commandline, and in the 
CLANGD_FLAGS environment var
     }
   }
 #endif
+  Opts.BackgroundIndex = EnableBackgroundIndex;
   Opts.StaticIndex = StaticIdx.get();
   Opts.AsyncThreadsCount = WorkerThreadsCount;
   Opts.BuildRecoveryAST = RecoveryAST;


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to