From: Kadir Cetinkaya Date: Wed, 19 Jul 2023 08:45:06 +0000 (+0200) Subject: Revert "[clangd] Remove unused private field 'Opts' in UpdateIndexCallbacks (NFC)" X-Git-Tag: upstream/17.0.6~1196 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d06af7a44eb3d72036c7c5e05e39d43609311dc5;p=platform%2Fupstream%2Fllvm.git Revert "[clangd] Remove unused private field 'Opts' in UpdateIndexCallbacks (NFC)" This reverts commit c4fa97fca7e92c736fcb09779c84b42c25ffae70. --- diff --git a/clang-tools-extra/clangd/ClangdServer.cpp b/clang-tools-extra/clangd/ClangdServer.cpp index cbcc902..1451adc 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()}, Tasks(Tasks), - CollectInactiveRegions(CollectInactiveRegions) {} + CollectInactiveRegions(CollectInactiveRegions), Opts(Opts) {} void onPreambleAST( PathRef Path, llvm::StringRef Version, CapturedASTCtx ASTCtx, @@ -163,6 +164,7 @@ private: std::shared_ptr 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( 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) {