Skip to content

Commit c4fa97f

Browse files
committed
[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.
1 parent 9d072bb commit c4fa97f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

clang-tools-extra/clangd/ClangdServer.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,10 @@ struct UpdateIndexCallbacks : public ParsingCallbacks {
6767
UpdateIndexCallbacks(FileIndex *FIndex,
6868
ClangdServer::Callbacks *ServerCallbacks,
6969
const ThreadsafeFS &TFS, AsyncTaskRunner *Tasks,
70-
bool CollectInactiveRegions,
71-
const ClangdServer::Options &Opts)
70+
bool CollectInactiveRegions)
7271
: FIndex(FIndex), ServerCallbacks(ServerCallbacks),
7372
TFS(TFS), Stdlib{std::make_shared<StdLibSet>()}, Tasks(Tasks),
74-
CollectInactiveRegions(CollectInactiveRegions), Opts(Opts) {}
73+
CollectInactiveRegions(CollectInactiveRegions) {}
7574

7675
void onPreambleAST(
7776
PathRef Path, llvm::StringRef Version, CapturedASTCtx ASTCtx,
@@ -164,7 +163,6 @@ struct UpdateIndexCallbacks : public ParsingCallbacks {
164163
std::shared_ptr<StdLibSet> Stdlib;
165164
AsyncTaskRunner *Tasks;
166165
bool CollectInactiveRegions;
167-
const ClangdServer::Options &Opts;
168166
};
169167

170168
class DraftStoreFS : public ThreadsafeFS {
@@ -229,7 +227,7 @@ ClangdServer::ClangdServer(const GlobalCompilationDatabase &CDB,
229227
std::make_unique<UpdateIndexCallbacks>(
230228
DynamicIdx.get(), Callbacks, TFS,
231229
IndexTasks ? &*IndexTasks : nullptr,
232-
PublishInactiveRegions, Opts));
230+
PublishInactiveRegions));
233231
// Adds an index to the stack, at higher priority than existing indexes.
234232
auto AddIndex = [&](SymbolIndex *Idx) {
235233
if (this->Index != nullptr) {

0 commit comments

Comments
 (0)