From e0a6ee33cc4428fe07c78edc918a8382c3931dc9 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 14 Aug 2025 21:45:02 -0700 Subject: [PATCH] index: remove unused SemaManager parameter --- src/indexer.cc | 4 ++-- src/indexer.hh | 4 ++-- src/pipeline.cc | 3 +-- src/test.cc | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/indexer.cc b/src/indexer.cc index 77071226..aad808e0 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -1226,8 +1226,8 @@ void init() { multiVersionMatcher = new GroupMatch(g_config->index.multiVersionWhitelist, g_config->index.multiVersionBlacklist); } -IndexResult index(SemaManager *manager, WorkingFiles *wfiles, VFS *vfs, const std::string &opt_wdir, - const std::string &main, const std::vector &args, +IndexResult index(WorkingFiles *wfiles, VFS *vfs, const std::string &opt_wdir, const std::string &main, + const std::vector &args, const std::vector> &remapped, bool no_linkage, bool &ok) { ok = true; auto pch = std::make_shared(); diff --git a/src/indexer.hh b/src/indexer.hh index d72a440e..aceec1f3 100644 --- a/src/indexer.hh +++ b/src/indexer.hh @@ -317,8 +317,8 @@ struct VFS; namespace idx { void init(); -IndexResult index(SemaManager *complete, WorkingFiles *wfiles, VFS *vfs, const std::string &opt_wdir, - const std::string &file, const std::vector &args, +IndexResult index(WorkingFiles *wfiles, VFS *vfs, const std::string &opt_wdir, const std::string &file, + const std::vector &args, const std::vector> &remapped, bool all_linkages, bool &ok); } // namespace idx } // namespace ccls diff --git a/src/pipeline.cc b/src/pipeline.cc index 0a8d85ab..8cb44561 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -338,8 +338,7 @@ bool indexer_Parse(SemaManager *completion, WorkingFiles *wfiles, Project *proje remapped.emplace_back(path_to_index, content); } bool ok; - auto result = - idx::index(completion, wfiles, vfs, entry.directory, path_to_index, entry.args, remapped, no_linkage, ok); + auto result = idx::index(wfiles, vfs, entry.directory, path_to_index, entry.args, remapped, no_linkage, ok); indexes = std::move(result.indexes); n_errs = result.n_errs; first_error = std::move(result.first_error); diff --git a/src/test.cc b/src/test.cc index c3c4d6d4..aec341da 100644 --- a/src/test.cc +++ b/src/test.cc @@ -259,7 +259,6 @@ bool runIndexTests(const std::string &filter_path, bool enable_update) { bool update_all = false; // FIXME: show diagnostics in STL/headers when running tests. At the moment // this can be done by conRequestIdex index(1, 1); - SemaManager completion(nullptr, nullptr, [&](std::string, std::vector) {}, [](RequestId id) {}); getFilesInFolder("index_tests", true /*recursive*/, true /*add_folder_to_path*/, [&](const std::string &path) { bool is_fail_allowed = false; @@ -293,7 +292,7 @@ bool runIndexTests(const std::string &filter_path, bool enable_update) { for (auto &arg : flags) cargs.push_back(arg.c_str()); bool ok; - auto result = ccls::idx::index(&completion, &wfiles, &vfs, "", path, cargs, {}, true, ok); + auto result = ccls::idx::index(&wfiles, &vfs, "", path, cargs, {}, true, ok); for (const auto &entry : all_expected_output) { const std::string &expected_path = entry.first;