[clang-tools-extra] d06af7a - Revert "[clangd] Remove unused private field 'Opts' in UpdateIndexCallbacks (NFC)"

Kadir Cetinkaya via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 19 01:46:47 PDT 2023


Author: Kadir Cetinkaya
Date: 2023-07-19T10:45:23+02:00
New Revision: d06af7a44eb3d72036c7c5e05e39d43609311dc5

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

LOG: Revert "[clangd] Remove unused private field 'Opts' in UpdateIndexCallbacks (NFC)"

This reverts commit c4fa97fca7e92c736fcb09779c84b42c25ffae70.

Added: 
    

Modified: 
    clang-tools-extra/clangd/ClangdServer.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp
index cbcc90258f34eb..1451adcbf4d4fe 100644
--- a/clang-tools-extra/clangd/ClangdServer.cpp
+++ b/clang-tools-extra/clangd/ClangdServer.cpp
@@ -67,10 +67,11 @@ struct UpdateIndexCallbacks : public ParsingCallbacks {
   UpdateIndexCallbacks(FileIndex *FIndex,
                        ClangdServer::Callbacks *ServerCallbacks,
                        const ThreadsafeFS &TFS, AsyncTaskRunner *Tasks,
-                       bool CollectInactiveRegions)
+                       bool CollectInactiveRegions,
+                       const ClangdServer::Options &Opts)
       : FIndex(FIndex), ServerCallbacks(ServerCallbacks),
         TFS(TFS), Stdlib{std::make_shared<StdLibSet>()}, Tasks(Tasks),
-        CollectInactiveRegions(CollectInactiveRegions) {}
+        CollectInactiveRegions(CollectInactiveRegions), Opts(Opts) {}
 
   void onPreambleAST(
       PathRef Path, llvm::StringRef Version, CapturedASTCtx ASTCtx,
@@ -163,6 +164,7 @@ struct UpdateIndexCallbacks : public ParsingCallbacks {
   std::shared_ptr<StdLibSet> Stdlib;
   AsyncTaskRunner *Tasks;
   bool CollectInactiveRegions;
+  const ClangdServer::Options &Opts;
 };
 
 class DraftStoreFS : public ThreadsafeFS {
@@ -227,7 +229,7 @@ ClangdServer::ClangdServer(const GlobalCompilationDatabase &CDB,
                         std::make_unique<UpdateIndexCallbacks>(
                             DynamicIdx.get(), Callbacks, TFS,
                             IndexTasks ? &*IndexTasks : nullptr,
-                            PublishInactiveRegions));
+                            PublishInactiveRegions, Opts));
   // Adds an index to the stack, at higher priority than existing indexes.
   auto AddIndex = [&](SymbolIndex *Idx) {
     if (this->Index != nullptr) {


        


More information about the cfe-commits mailing list