Skip to content

Commit

Permalink
[clangd] Remove unused private field 'Opts' in UpdateIndexCallbacks (…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
DamonFool committed Jul 19, 2023
1 parent 9d072bb commit c4fa97f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions clang-tools-extra/clangd/ClangdServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit c4fa97f

Please sign in to comment.