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

Jie Fu via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 19 00:29:28 PDT 2023


Author: Jie Fu
Date: 2023-07-19T15:28:38+08:00
New Revision: c4fa97fca7e92c736fcb09779c84b42c25ffae70

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

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

/Users/jiefu/llvm-project/clang-tools-extra/clangd/ClangdServer.cpp:167:32: error: private field 'Opts' is not used [-Werror,-Wunused-private-field]
  const ClangdServer::Options &Opts;
                               ^
1 error generated.

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 52731222ed8264..763fea68360ac9 100644
--- a/clang-tools-extra/clangd/ClangdServer.cpp
+++ b/clang-tools-extra/clangd/ClangdServer.cpp
@@ -67,11 +67,10 @@ struct UpdateIndexCallbacks : public ParsingCallbacks {
   UpdateIndexCallbacks(FileIndex *FIndex,
                        ClangdServer::Callbacks *ServerCallbacks,
                        const ThreadsafeFS &TFS, AsyncTaskRunner *Tasks,
-                       bool CollectInactiveRegions,
-                       const ClangdServer::Options &Opts)
+                       bool CollectInactiveRegions)
       : FIndex(FIndex), ServerCallbacks(ServerCallbacks),
         TFS(TFS), Stdlib{std::make_shared<StdLibSet>()}, Tasks(Tasks),
-        CollectInactiveRegions(CollectInactiveRegions), Opts(Opts) {}
+        CollectInactiveRegions(CollectInactiveRegions) {}
 
   void onPreambleAST(
       PathRef Path, llvm::StringRef Version, CapturedASTCtx ASTCtx,
@@ -164,7 +163,6 @@ struct UpdateIndexCallbacks : public ParsingCallbacks {
   std::shared_ptr<StdLibSet> Stdlib;
   AsyncTaskRunner *Tasks;
   bool CollectInactiveRegions;
-  const ClangdServer::Options &Opts;
 };
 
 class DraftStoreFS : public ThreadsafeFS {
@@ -229,7 +227,7 @@ ClangdServer::ClangdServer(const GlobalCompilationDatabase &CDB,
                         std::make_unique<UpdateIndexCallbacks>(
                             DynamicIdx.get(), Callbacks, TFS,
                             IndexTasks ? &*IndexTasks : nullptr,
-                            PublishInactiveRegions, Opts));
+                            PublishInactiveRegions));
   // 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