[clang-tools-extra] 3d2cf72 - [clangd] Fix the background index is not disabled when using remote-index.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 10 05:02:45 PDT 2020


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;


        


More information about the cfe-commits mailing list