Cleanup some includes.

This commit is contained in:
Jacob Dufault 2017-12-29 10:29:47 -06:00
parent 48f3c75053
commit c596e55dcc
37 changed files with 135 additions and 86 deletions

View File

@ -2,7 +2,9 @@
#include "cache.h" #include "cache.h"
#include "cache_loader.h" #include "cache_loader.h"
#include "clang_complete.h" #include "clang_complete.h"
#include "code_complete_cache.h"
#include "file_consumer.h" #include "file_consumer.h"
#include "import_manager.h"
#include "import_pipeline.h" #include "import_pipeline.h"
#include "include_complete.h" #include "include_complete.h"
#include "indexer.h" #include "indexer.h"
@ -17,6 +19,7 @@
#include "query.h" #include "query.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h" #include "queue_manager.h"
#include "semantic_highlight_symbol_cache.h"
#include "serializer.h" #include "serializer.h"
#include "standard_includes.h" #include "standard_includes.h"
#include "test.h" #include "test.h"
@ -96,7 +99,7 @@ bool QueryDbMainLoop(Config* config,
QueryDatabase* db, QueryDatabase* db,
MultiQueueWaiter* waiter, MultiQueueWaiter* waiter,
Project* project, Project* project,
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
ImportManager* import_manager, ImportManager* import_manager,
TimestampManager* timestamp_manager, TimestampManager* timestamp_manager,
SemanticHighlightSymbolCache* semantic_cache, SemanticHighlightSymbolCache* semantic_cache,
@ -144,7 +147,7 @@ void RunQueryDbThread(const std::string& bin_name,
Project project; Project project;
SemanticHighlightSymbolCache semantic_cache; SemanticHighlightSymbolCache semantic_cache;
WorkingFiles working_files; WorkingFiles working_files;
FileConsumer::SharedState file_consumer_shared; FileConsumerSharedState file_consumer_shared;
ClangCompleteManager clang_complete( ClangCompleteManager clang_complete(
config, &project, &working_files, config, &project, &working_files,

View File

@ -12,19 +12,19 @@ bool operator==(const CXFileUniqueID& a, const CXFileUniqueID& b) {
a.data[2] == b.data[2]; a.data[2] == b.data[2];
} }
bool FileConsumer::SharedState::Mark(const std::string& file) { bool FileConsumerSharedState::Mark(const std::string& file) {
std::lock_guard<std::mutex> lock(mutex); std::lock_guard<std::mutex> lock(mutex);
return files.insert(file).second; return files.insert(file).second;
} }
void FileConsumer::SharedState::Reset(const std::string& file) { void FileConsumerSharedState::Reset(const std::string& file) {
std::lock_guard<std::mutex> lock(mutex); std::lock_guard<std::mutex> lock(mutex);
auto it = files.find(file); auto it = files.find(file);
if (it != files.end()) if (it != files.end())
files.erase(it); files.erase(it);
} }
FileConsumer::FileConsumer(SharedState* shared_state, FileConsumer::FileConsumer(FileConsumerSharedState* shared_state,
const std::string& parse_file) const std::string& parse_file)
: shared_(shared_state), parse_file_(parse_file) {} : shared_(shared_state), parse_file_(parse_file) {}

View File

@ -15,6 +15,16 @@ struct IndexFile;
MAKE_HASHABLE(CXFileUniqueID, t.data[0], t.data[1], t.data[2]); MAKE_HASHABLE(CXFileUniqueID, t.data[0], t.data[1], t.data[2]);
bool operator==(const CXFileUniqueID& a, const CXFileUniqueID& b); bool operator==(const CXFileUniqueID& a, const CXFileUniqueID& b);
struct FileConsumerSharedState {
mutable std::unordered_set<std::string> files;
mutable std::mutex mutex;
// Mark the file as used. Returns true if the file was not previously used.
bool Mark(const std::string& file);
// Reset the used state (ie, mark the file as unused).
void Reset(const std::string& file);
};
// FileConsumer is used by the indexer. When it encouters a file, it tries to // FileConsumer is used by the indexer. When it encouters a file, it tries to
// take ownership over it. If the indexer has ownership over a file, it will // take ownership over it. If the indexer has ownership over a file, it will
// produce an index, otherwise, it will emit nothing for that declarations // produce an index, otherwise, it will emit nothing for that declarations
@ -23,17 +33,8 @@ bool operator==(const CXFileUniqueID& a, const CXFileUniqueID& b);
// The indexer does this because header files do not have their own translation // The indexer does this because header files do not have their own translation
// units but we still want to index them. // units but we still want to index them.
struct FileConsumer { struct FileConsumer {
struct SharedState { FileConsumer(FileConsumerSharedState* shared_state,
mutable std::unordered_set<std::string> files; const std::string& parse_file);
mutable std::mutex mutex;
// Mark the file as used. Returns true if the file was not previously used.
bool Mark(const std::string& file);
// Reset the used state (ie, mark the file as unused).
void Reset(const std::string& file);
};
FileConsumer(SharedState* shared_state, const std::string& parse_file);
// Returns true if this instance owns given |file|. This will also attempt to // Returns true if this instance owns given |file|. This will also attempt to
// take ownership over |file|. // take ownership over |file|.
@ -53,6 +54,6 @@ struct FileConsumer {
void EmitError(CXFile file) const; void EmitError(CXFile file) const;
std::unordered_map<CXFileUniqueID, std::unique_ptr<IndexFile>> local_; std::unordered_map<CXFileUniqueID, std::unique_ptr<IndexFile>> local_;
SharedState* shared_; FileConsumerSharedState* shared_;
std::string parse_file_; std::string parse_file_;
}; };

View File

@ -1,47 +1,23 @@
#include "import_pipeline.h" #include "import_pipeline.h"
// TODO: cleanup includes
#include "cache.h" #include "cache.h"
#include "cache_loader.h" #include "cache_loader.h"
#include "clang_complete.h" #include "config.h"
#include "file_consumer.h" #include "import_manager.h"
#include "include_complete.h"
#include "indexer.h"
#include "language_server_api.h" #include "language_server_api.h"
#include "lex_utils.h"
#include "lru_cache.h"
#include "match.h"
#include "message_handler.h" #include "message_handler.h"
#include "options.h"
#include "platform.h" #include "platform.h"
#include "project.h" #include "project.h"
#include "query.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h" #include "queue_manager.h"
#include "serializer.h"
#include "standard_includes.h"
#include "test.h"
#include "threaded_queue.h"
#include "timer.h" #include "timer.h"
#include "timestamp_manager.h" #include "timestamp_manager.h"
#include "work_thread.h"
#include "working_files.h"
#include <doctest/doctest.h> #include <doctest/doctest.h>
#include <rapidjson/istreamwrapper.h>
#include <rapidjson/ostreamwrapper.h>
#include <loguru.hpp> #include <loguru.hpp>
#include <climits> #include <memory>
#include <fstream>
#include <functional>
#include <future>
#include <iostream>
#include <iterator>
#include <sstream>
#include <string> #include <string>
#include <thread>
#include <unordered_map>
#include <vector> #include <vector>
ImportPipelineStatus::ImportPipelineStatus() : num_active_threads(0) {} ImportPipelineStatus::ImportPipelineStatus() : num_active_threads(0) {}
@ -67,7 +43,7 @@ std::vector<Index_DoIdMap> DoParseFile(
Config* config, Config* config,
WorkingFiles* working_files, WorkingFiles* working_files,
ClangIndex* index, ClangIndex* index,
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
TimestampManager* timestamp_manager, TimestampManager* timestamp_manager,
ImportManager* import_manager, ImportManager* import_manager,
CacheLoader* cache_loader, CacheLoader* cache_loader,
@ -247,7 +223,7 @@ std::vector<Index_DoIdMap> DoParseFile(
// real-time indexing. // real-time indexing.
// TODO: add option to disable this. // TODO: add option to disable this.
void IndexWithTuFromCodeCompletion( void IndexWithTuFromCodeCompletion(
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
ClangTranslationUnit* tu, ClangTranslationUnit* tu,
const std::vector<CXUnsavedFile>& file_contents, const std::vector<CXUnsavedFile>& file_contents,
const std::string& path, const std::string& path,
@ -281,7 +257,7 @@ std::vector<Index_DoIdMap> ParseFile(
Config* config, Config* config,
WorkingFiles* working_files, WorkingFiles* working_files,
ClangIndex* index, ClangIndex* index,
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
TimestampManager* timestamp_manager, TimestampManager* timestamp_manager,
ImportManager* import_manager, ImportManager* import_manager,
bool is_interactive, bool is_interactive,
@ -305,7 +281,7 @@ std::vector<Index_DoIdMap> ParseFile(
bool IndexMain_DoParse(Config* config, bool IndexMain_DoParse(Config* config,
WorkingFiles* working_files, WorkingFiles* working_files,
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
TimestampManager* timestamp_manager, TimestampManager* timestamp_manager,
ImportManager* import_manager, ImportManager* import_manager,
ClangIndex* index) { ClangIndex* index) {
@ -437,7 +413,7 @@ bool IndexMergeIndexUpdates() {
} }
void Indexer_Main(Config* config, void Indexer_Main(Config* config,
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
TimestampManager* timestamp_manager, TimestampManager* timestamp_manager,
ImportManager* import_manager, ImportManager* import_manager,
ImportPipelineStatus* status, ImportPipelineStatus* status,

View File

@ -1,6 +1,7 @@
#pragma once #pragma once
#include "file_consumer.h" // FIXME: do not include clang-c outside of clang_ files.
#include <clang-c/Index.h>
#include <atomic> #include <atomic>
#include <string> #include <string>
@ -8,6 +9,7 @@
struct ClangTranslationUnit; struct ClangTranslationUnit;
struct Config; struct Config;
struct FileConsumerSharedState;
struct ImportManager; struct ImportManager;
struct MultiQueueWaiter; struct MultiQueueWaiter;
struct Project; struct Project;
@ -23,14 +25,14 @@ struct ImportPipelineStatus {
}; };
void IndexWithTuFromCodeCompletion( void IndexWithTuFromCodeCompletion(
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
ClangTranslationUnit* tu, ClangTranslationUnit* tu,
const std::vector<CXUnsavedFile>& file_contents, const std::vector<CXUnsavedFile>& file_contents,
const std::string& path, const std::string& path,
const std::vector<std::string>& args); const std::vector<std::string>& args);
void Indexer_Main(Config* config, void Indexer_Main(Config* config,
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
TimestampManager* timestamp_manager, TimestampManager* timestamp_manager,
ImportManager* import_manager, ImportManager* import_manager,
ImportPipelineStatus* status, ImportPipelineStatus* status,

View File

@ -1808,7 +1808,7 @@ optional<std::string> FileContentsWithOffsets::ContentsInRange(
std::vector<std::unique_ptr<IndexFile>> Parse( std::vector<std::unique_ptr<IndexFile>> Parse(
Config* config, Config* config,
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
std::string file, std::string file,
const std::vector<std::string>& args, const std::vector<std::string>& args,
const std::vector<FileContents>& file_contents, const std::vector<FileContents>& file_contents,
@ -1848,7 +1848,7 @@ std::vector<std::unique_ptr<IndexFile>> Parse(
} }
std::vector<std::unique_ptr<IndexFile>> ParseWithTu( std::vector<std::unique_ptr<IndexFile>> ParseWithTu(
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
PerformanceImportFile* perf, PerformanceImportFile* perf,
ClangTranslationUnit* tu, ClangTranslationUnit* tu,
ClangIndex* index, ClangIndex* index,

View File

@ -562,7 +562,7 @@ struct NamespaceHelper {
// reparse. // reparse.
std::vector<std::unique_ptr<IndexFile>> Parse( std::vector<std::unique_ptr<IndexFile>> Parse(
Config* config, Config* config,
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
std::string file, std::string file,
const std::vector<std::string>& args, const std::vector<std::string>& args,
const std::vector<FileContents>& file_contents, const std::vector<FileContents>& file_contents,
@ -570,7 +570,7 @@ std::vector<std::unique_ptr<IndexFile>> Parse(
ClangIndex* index, ClangIndex* index,
bool dump_ast = false); bool dump_ast = false);
std::vector<std::unique_ptr<IndexFile>> ParseWithTu( std::vector<std::unique_ptr<IndexFile>> ParseWithTu(
FileConsumer::SharedState* file_consumer_shared, FileConsumerSharedState* file_consumer_shared,
PerformanceImportFile* perf, PerformanceImportFile* perf,
ClangTranslationUnit* tu, ClangTranslationUnit* tu,
ClangIndex* index, ClangIndex* index,

View File

@ -2,6 +2,8 @@
#include "lex_utils.h" #include "lex_utils.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
#include "semantic_highlight_symbol_cache.h"
#include <loguru.hpp> #include <loguru.hpp>

View File

@ -1,19 +1,28 @@
#pragma once #pragma once
#include "cache_loader.h" #include "ipc.h"
#include "clang_complete.h" #include "language_server_api.h"
#include "code_complete_cache.h"
#include "config.h"
#include "import_manager.h"
#include "import_pipeline.h"
#include "include_complete.h"
#include "queue_manager.h"
#include "project.h"
#include "query.h" #include "query.h"
#include "semantic_highlight_symbol_cache.h"
#include "threaded_queue.h" #include <optional.h>
#include "timestamp_manager.h"
#include "working_files.h" #include <memory>
#include <vector>
struct ClangCompleteManager;
struct CodeCompleteCache;
struct Config;
struct FileConsumerSharedState;
struct ImportManager;
struct ImportPipelineStatus;
struct IncludeComplete;
struct MultiQueueWaiter;
struct Project;
struct QueryDatabase;
struct SemanticHighlightSymbolCache;
struct TimestampManager;
struct WorkingFile;
struct WorkingFiles;
// Usage: // Usage:
// //
@ -33,7 +42,7 @@ struct MessageHandler {
QueryDatabase* db = nullptr; QueryDatabase* db = nullptr;
MultiQueueWaiter* waiter = nullptr; MultiQueueWaiter* waiter = nullptr;
Project* project = nullptr; Project* project = nullptr;
FileConsumer::SharedState* file_consumer_shared = nullptr; FileConsumerSharedState* file_consumer_shared = nullptr;
ImportManager* import_manager = nullptr; ImportManager* import_manager = nullptr;
ImportPipelineStatus* import_pipeline_status = nullptr; ImportPipelineStatus* import_pipeline_status = nullptr;
TimestampManager* timestamp_manager = nullptr; TimestampManager* timestamp_manager = nullptr;

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {
struct Ipc_CqueryBase : public IpcMessage<Ipc_CqueryBase> { struct Ipc_CqueryBase : public IpcMessage<Ipc_CqueryBase> {

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {
struct Ipc_CqueryCallTreeInitial struct Ipc_CqueryCallTreeInitial

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {
struct Ipc_CqueryCallers : public IpcMessage<Ipc_CqueryCallers> { struct Ipc_CqueryCallers : public IpcMessage<Ipc_CqueryCallers> {

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {
struct Ipc_CqueryDerived : public IpcMessage<Ipc_CqueryDerived> { struct Ipc_CqueryDerived : public IpcMessage<Ipc_CqueryDerived> {

View File

@ -1,4 +1,6 @@
#include "clang_complete.h"
#include "message_handler.h" #include "message_handler.h"
#include "working_files.h"
namespace { namespace {
struct Ipc_CqueryTextDocumentDidView struct Ipc_CqueryTextDocumentDidView

View File

@ -1,5 +1,10 @@
#include "cache_loader.h"
#include "message_handler.h" #include "message_handler.h"
#include "platform.h" #include "platform.h"
#include "project.h"
#include "queue_manager.h"
#include "timestamp_manager.h"
#include "working_files.h"
#include <loguru.hpp> #include <loguru.hpp>

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "platform.h" #include "platform.h"
#include "queue_manager.h"
#include <loguru/loguru.hpp> #include <loguru/loguru.hpp>

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {
struct Ipc_CqueryTypeHierarchyTree struct Ipc_CqueryTypeHierarchyTree

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {
struct Ipc_CqueryVars : public IpcMessage<Ipc_CqueryVars> { struct Ipc_CqueryVars : public IpcMessage<Ipc_CqueryVars> {

View File

@ -1,5 +1,7 @@
#include "import_manager.h"
#include "import_pipeline.h" #include "import_pipeline.h"
#include "message_handler.h" #include "message_handler.h"
#include "queue_manager.h"
#include <loguru.hpp> #include <loguru.hpp>

View File

@ -1,7 +1,11 @@
#include "import_pipeline.h" #include "import_pipeline.h"
#include "include_complete.h"
#include "message_handler.h" #include "message_handler.h"
#include "platform.h" #include "platform.h"
#include "project.h"
#include "queue_manager.h"
#include "timer.h" #include "timer.h"
#include "working_files.h"
#include <loguru.hpp> #include <loguru.hpp>
@ -174,8 +178,8 @@ struct InitializeHandler : BaseMessageHandler<Ipc_InitializeRequest> {
for (int i = 0; i < config->indexerCount; ++i) { for (int i = 0; i < config->indexerCount; ++i) {
WorkThread::StartThread("indexer" + std::to_string(i), [=]() { WorkThread::StartThread("indexer" + std::to_string(i), [=]() {
Indexer_Main(config, file_consumer_shared, timestamp_manager, Indexer_Main(config, file_consumer_shared, timestamp_manager,
import_manager, import_pipeline_status, project, import_manager, import_pipeline_status, project,
working_files, waiter); working_files, waiter);
}); });
} }

View File

@ -1,6 +1,8 @@
#include "include_complete.h"
#include "lex_utils.h" #include "lex_utils.h"
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
#include <doctest/doctest.h> #include <doctest/doctest.h>

View File

@ -1,5 +1,7 @@
#include "clang_complete.h"
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {
struct lsDocumentCodeLensParams { struct lsDocumentCodeLensParams {

View File

@ -1,4 +1,9 @@
#include "clang_complete.h"
#include "code_complete_cache.h"
#include "include_complete.h"
#include "message_handler.h" #include "message_handler.h"
#include "queue_manager.h"
#include "working_files.h"
#include "lex_utils.h" #include "lex_utils.h"
@ -222,14 +227,16 @@ struct TextDocumentCompletionHandler : MessageHandler {
!global_code_complete_cache->cached_results_.empty(); !global_code_complete_cache->cached_results_.empty();
}); });
if (is_cache_match) { if (is_cache_match) {
ClangCompleteManager::OnComplete freshen_global = [this]( ClangCompleteManager::OnComplete freshen_global =
std::vector<lsCompletionItem> results, bool is_cached_result) { [this](std::vector<lsCompletionItem> results,
assert(!is_cached_result); bool is_cached_result) {
assert(!is_cached_result);
// note: path is updated in the normal completion handler. // note: path is updated in the normal completion handler.
global_code_complete_cache->WithLock( global_code_complete_cache->WithLock([&]() {
[&]() { global_code_complete_cache->cached_results_ = results; }); global_code_complete_cache->cached_results_ = results;
}; });
};
global_code_complete_cache->WithLock([&]() { global_code_complete_cache->WithLock([&]() {
callback(global_code_complete_cache->cached_results_, callback(global_code_complete_cache->cached_results_,

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {
void PushBack(std::vector<lsLocation>* result, optional<lsLocation> location) { void PushBack(std::vector<lsLocation>* result, optional<lsLocation> location) {

View File

@ -1,4 +1,6 @@
#include "clang_complete.h"
#include "message_handler.h" #include "message_handler.h"
#include "working_files.h"
namespace { namespace {
struct Ipc_TextDocumentDidChange struct Ipc_TextDocumentDidChange

View File

@ -1,4 +1,7 @@
#include "clang_complete.h"
#include "message_handler.h" #include "message_handler.h"
#include "queue_manager.h"
#include "working_files.h"
namespace { namespace {
struct Ipc_TextDocumentDidClose : public IpcMessage<Ipc_TextDocumentDidClose> { struct Ipc_TextDocumentDidClose : public IpcMessage<Ipc_TextDocumentDidClose> {

View File

@ -1,6 +1,11 @@
#include "cache.h" #include "cache.h"
#include "clang_complete.h"
#include "include_complete.h"
#include "message_handler.h" #include "message_handler.h"
#include "project.h"
#include "queue_manager.h"
#include "timer.h" #include "timer.h"
#include "working_files.h"
namespace { namespace {
// Open, view, change, close file // Open, view, change, close file

View File

@ -1,4 +1,7 @@
#include "clang_complete.h"
#include "message_handler.h" #include "message_handler.h"
#include "project.h"
#include "queue_manager.h"
namespace { namespace {
struct Ipc_TextDocumentDidSave : public IpcMessage<Ipc_TextDocumentDidSave> { struct Ipc_TextDocumentDidSave : public IpcMessage<Ipc_TextDocumentDidSave> {

View File

@ -1,5 +1,7 @@
#include "lex_utils.h" #include "lex_utils.h"
#include "message_handler.h" #include "message_handler.h"
#include "queue_manager.h"
#include "working_files.h"
#include <loguru.hpp> #include <loguru.hpp>

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {
struct lsDocumentSymbolParams { struct lsDocumentSymbolParams {

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {
struct Ipc_TextDocumentDocumentHighlight struct Ipc_TextDocumentDocumentHighlight

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
#include <loguru.hpp> #include <loguru.hpp>

View File

@ -1,5 +1,6 @@
#include "message_handler.h" #include "message_handler.h"
#include "query_utils.h" #include "query_utils.h"
#include "queue_manager.h"
namespace { namespace {

View File

@ -1,4 +1,7 @@
#include "clang_complete.h"
#include "code_complete_cache.h"
#include "message_handler.h" #include "message_handler.h"
#include "queue_manager.h"
#include "timer.h" #include "timer.h"
namespace { namespace {

View File

@ -1,14 +1,15 @@
#include "lex_utils.h"
#include "message_handler.h"
#include "query_utils.h"
#include "queue_manager.h"
#include <loguru.hpp>
#include <ctype.h> #include <ctype.h>
#include <limits.h> #include <limits.h>
#include <algorithm> #include <algorithm>
#include <functional> #include <functional>
#include "lex_utils.h"
#include "message_handler.h"
#include "query_utils.h"
#include <loguru.hpp>
namespace { namespace {
// Lookup |symbol| in |db| and insert the value into |result|. // Lookup |symbol| in |db| and insert the value into |result|.

View File

@ -160,7 +160,7 @@ void RunIndexTests(const std::string& filter_path) {
// Run test. // Run test.
Config config; Config config;
FileConsumer::SharedState file_consumer_shared; FileConsumerSharedState file_consumer_shared;
PerformanceImportFile perf; PerformanceImportFile perf;
std::vector<std::unique_ptr<IndexFile>> dbs = std::vector<std::unique_ptr<IndexFile>> dbs =
Parse(&config, &file_consumer_shared, path, flags, {}, &perf, &index, Parse(&config, &file_consumer_shared, path, flags, {}, &perf, &index,