mirror of
https://github.com/MaskRay/ccls.git
synced 2025-08-17 20:22:23 +00:00
index: remove unused SemaManager parameter
This commit is contained in:
parent
4427527ed8
commit
e0a6ee33cc
@ -1226,8 +1226,8 @@ void init() {
|
|||||||
multiVersionMatcher = new GroupMatch(g_config->index.multiVersionWhitelist, g_config->index.multiVersionBlacklist);
|
multiVersionMatcher = new GroupMatch(g_config->index.multiVersionWhitelist, g_config->index.multiVersionBlacklist);
|
||||||
}
|
}
|
||||||
|
|
||||||
IndexResult index(SemaManager *manager, WorkingFiles *wfiles, VFS *vfs, const std::string &opt_wdir,
|
IndexResult index(WorkingFiles *wfiles, VFS *vfs, const std::string &opt_wdir, const std::string &main,
|
||||||
const std::string &main, const std::vector<const char *> &args,
|
const std::vector<const char *> &args,
|
||||||
const std::vector<std::pair<std::string, std::string>> &remapped, bool no_linkage, bool &ok) {
|
const std::vector<std::pair<std::string, std::string>> &remapped, bool no_linkage, bool &ok) {
|
||||||
ok = true;
|
ok = true;
|
||||||
auto pch = std::make_shared<PCHContainerOperations>();
|
auto pch = std::make_shared<PCHContainerOperations>();
|
||||||
|
@ -317,8 +317,8 @@ struct VFS;
|
|||||||
|
|
||||||
namespace idx {
|
namespace idx {
|
||||||
void init();
|
void init();
|
||||||
IndexResult index(SemaManager *complete, WorkingFiles *wfiles, VFS *vfs, const std::string &opt_wdir,
|
IndexResult index(WorkingFiles *wfiles, VFS *vfs, const std::string &opt_wdir, const std::string &file,
|
||||||
const std::string &file, const std::vector<const char *> &args,
|
const std::vector<const char *> &args,
|
||||||
const std::vector<std::pair<std::string, std::string>> &remapped, bool all_linkages, bool &ok);
|
const std::vector<std::pair<std::string, std::string>> &remapped, bool all_linkages, bool &ok);
|
||||||
} // namespace idx
|
} // namespace idx
|
||||||
} // namespace ccls
|
} // namespace ccls
|
||||||
|
@ -338,8 +338,7 @@ bool indexer_Parse(SemaManager *completion, WorkingFiles *wfiles, Project *proje
|
|||||||
remapped.emplace_back(path_to_index, content);
|
remapped.emplace_back(path_to_index, content);
|
||||||
}
|
}
|
||||||
bool ok;
|
bool ok;
|
||||||
auto result =
|
auto result = idx::index(wfiles, vfs, entry.directory, path_to_index, entry.args, remapped, no_linkage, ok);
|
||||||
idx::index(completion, wfiles, vfs, entry.directory, path_to_index, entry.args, remapped, no_linkage, ok);
|
|
||||||
indexes = std::move(result.indexes);
|
indexes = std::move(result.indexes);
|
||||||
n_errs = result.n_errs;
|
n_errs = result.n_errs;
|
||||||
first_error = std::move(result.first_error);
|
first_error = std::move(result.first_error);
|
||||||
|
@ -259,7 +259,6 @@ bool runIndexTests(const std::string &filter_path, bool enable_update) {
|
|||||||
bool update_all = false;
|
bool update_all = false;
|
||||||
// FIXME: show diagnostics in STL/headers when running tests. At the moment
|
// FIXME: show diagnostics in STL/headers when running tests. At the moment
|
||||||
// this can be done by conRequestIdex index(1, 1);
|
// this can be done by conRequestIdex index(1, 1);
|
||||||
SemaManager completion(nullptr, nullptr, [&](std::string, std::vector<Diagnostic>) {}, [](RequestId id) {});
|
|
||||||
getFilesInFolder("index_tests", true /*recursive*/, true /*add_folder_to_path*/, [&](const std::string &path) {
|
getFilesInFolder("index_tests", true /*recursive*/, true /*add_folder_to_path*/, [&](const std::string &path) {
|
||||||
bool is_fail_allowed = false;
|
bool is_fail_allowed = false;
|
||||||
|
|
||||||
@ -293,7 +292,7 @@ bool runIndexTests(const std::string &filter_path, bool enable_update) {
|
|||||||
for (auto &arg : flags)
|
for (auto &arg : flags)
|
||||||
cargs.push_back(arg.c_str());
|
cargs.push_back(arg.c_str());
|
||||||
bool ok;
|
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) {
|
for (const auto &entry : all_expected_output) {
|
||||||
const std::string &expected_path = entry.first;
|
const std::string &expected_path = entry.first;
|
||||||
|
Loading…
Reference in New Issue
Block a user