diff --git a/src/clang_complete.cc b/src/clang_complete.cc index c8419b5f..9566ebb5 100644 --- a/src/clang_complete.cc +++ b/src/clang_complete.cc @@ -6,8 +6,8 @@ #include "clang_tu.hh" #include "filesystem.hh" #include "log.hh" -#include "match.h" -#include "platform.h" +#include "match.hh" +#include "platform.hh" #include #include @@ -406,7 +406,7 @@ void *CompletionMain(void *manager_) { DiagnosticConsumer DC; WorkingFiles::Snapshot snapshot = - manager->working_files_->AsSnapshot({StripFileType(path)}); + manager->wfiles_->AsSnapshot({StripFileType(path)}); std::vector> Bufs; auto Clang = BuildCompilerInstance(*session, std::move(CI), FS, DC, preamble.get(), snapshot, Bufs); @@ -480,7 +480,7 @@ void *DiagnosticMain(void *manager_) { CI->getLangOpts()->SpellChecking = g_config->diagnostics.spellChecking; StoreDiags DC(path); WorkingFiles::Snapshot snapshot = - manager->working_files_->AsSnapshot({StripFileType(path)}); + manager->wfiles_->AsSnapshot({StripFileType(path)}); std::vector> Bufs; auto Clang = BuildCompilerInstance(*session, std::move(CI), FS, DC, preamble.get(), snapshot, Bufs); @@ -564,10 +564,10 @@ std::shared_ptr CompletionSession::GetPreamble() { } CompletionManager::CompletionManager(Project *project, - WorkingFiles *working_files, + WorkingFiles *wfiles, OnDiagnostic on_diagnostic, OnDropped on_dropped) - : project_(project), working_files_(working_files), + : project_(project), wfiles_(wfiles), on_diagnostic_(on_diagnostic), on_dropped_(on_dropped), preloads(kMaxPreloadedSessions), sessions(kMaxCompletionSessions), @@ -626,7 +626,7 @@ bool CompletionManager::EnsureCompletionOrCreatePreloadSession( // No CompletionSession, create new one. auto session = std::make_shared( - project_->FindEntry(path, false), working_files_, PCH); + project_->FindEntry(path, false), wfiles_, PCH); if (session->file.filename != path) { session->inferred = true; session->file.filename = path; @@ -655,7 +655,7 @@ CompletionManager::TryGetSession(const std::string &path, bool preload, session = sessions.TryGet(path); if (!session && !preload) { session = std::make_shared( - project_->FindEntry(path, false), working_files_, PCH); + project_->FindEntry(path, false), wfiles_, PCH); sessions.Insert(path, session); LOG_S(INFO) << "create session for " << path; if (is_open) diff --git a/src/clang_complete.hh b/src/clang_complete.hh index 21ce4876..e1984e93 100644 --- a/src/clang_complete.hh +++ b/src/clang_complete.hh @@ -4,11 +4,11 @@ #pragma once #include "clang_tu.hh" -#include "lru_cache.h" +#include "lru_cache.hh" #include "lsp.hh" #include "project.hh" -#include "threaded_queue.h" -#include "working_files.h" +#include "threaded_queue.hh" +#include "working_files.hh" #include #include @@ -96,7 +96,7 @@ struct CompletionManager { int64_t debounce; }; - CompletionManager(Project *project, WorkingFiles *working_files, + CompletionManager(Project *project, WorkingFiles *wfiles, OnDiagnostic on_diagnostic, OnDropped on_dropped); // Request a diagnostics update. @@ -129,7 +129,7 @@ struct CompletionManager { // Global state. Project *project_; - WorkingFiles *working_files_; + WorkingFiles *wfiles_; OnDiagnostic on_diagnostic_; OnDropped on_dropped_; diff --git a/src/clang_tu.cc b/src/clang_tu.cc index 2a85e694..5bacc9b8 100644 --- a/src/clang_tu.cc +++ b/src/clang_tu.cc @@ -3,8 +3,8 @@ #include "clang_tu.hh" -#include "config.h" -#include "platform.h" +#include "config.hh" +#include "platform.hh" #include #include diff --git a/src/clang_tu.hh b/src/clang_tu.hh index 29cda7f9..f301334f 100644 --- a/src/clang_tu.hh +++ b/src/clang_tu.hh @@ -3,7 +3,7 @@ #pragma once -#include "position.h" +#include "position.hh" #include #include diff --git a/src/config.cc b/src/config.cc index 5ba8f5c4..34284c6a 100644 --- a/src/config.cc +++ b/src/config.cc @@ -1,7 +1,7 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "config.h" +#include "config.hh" namespace ccls { Config *g_config; diff --git a/src/config.h b/src/config.hh similarity index 100% rename from src/config.h rename to src/config.hh diff --git a/src/filesystem.cc b/src/filesystem.cc index ff797b0b..e85e663f 100644 --- a/src/filesystem.cc +++ b/src/filesystem.cc @@ -4,7 +4,7 @@ #include "filesystem.hh" using namespace llvm; -#include "utils.h" +#include "utils.hh" #include #include diff --git a/src/fuzzy_match.cc b/src/fuzzy_match.cc index 7c44c452..af1dd532 100644 --- a/src/fuzzy_match.cc +++ b/src/fuzzy_match.cc @@ -1,7 +1,7 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "fuzzy_match.h" +#include "fuzzy_match.hh" #include #include diff --git a/src/fuzzy_match.h b/src/fuzzy_match.hh similarity index 100% rename from src/fuzzy_match.h rename to src/fuzzy_match.hh diff --git a/src/include_complete.cc b/src/include_complete.cc index 71749012..2703d296 100644 --- a/src/include_complete.cc +++ b/src/include_complete.cc @@ -1,11 +1,11 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "include_complete.h" +#include "include_complete.hh" #include "filesystem.hh" -#include "match.h" -#include "platform.h" +#include "match.hh" +#include "platform.hh" #include "project.hh" #include diff --git a/src/include_complete.h b/src/include_complete.hh similarity index 100% rename from src/include_complete.h rename to src/include_complete.hh diff --git a/src/indexer.cc b/src/indexer.cc index 7bca21d6..6dc51d6b 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -1,14 +1,14 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "indexer.h" +#include "indexer.hh" #include "clang_complete.hh" #include "clang_tu.hh" #include "log.hh" -#include "match.h" +#include "match.hh" #include "pipeline.hh" -#include "platform.h" +#include "platform.hh" #include "serializer.hh" #include diff --git a/src/indexer.h b/src/indexer.hh similarity index 99% rename from src/indexer.h rename to src/indexer.hh index 7f353563..e60ce661 100644 --- a/src/indexer.h +++ b/src/indexer.hh @@ -4,10 +4,10 @@ #pragma once #include "lsp.hh" -#include "maybe.h" -#include "position.h" +#include "maybe.hh" +#include "position.hh" #include "serializer.hh" -#include "utils.h" +#include "utils.hh" #include #include diff --git a/src/lru_cache.h b/src/lru_cache.hh similarity index 100% rename from src/lru_cache.h rename to src/lru_cache.hh diff --git a/src/lsp.cc b/src/lsp.cc index 50e9d5de..324faf43 100644 --- a/src/lsp.cc +++ b/src/lsp.cc @@ -4,7 +4,7 @@ #include "lsp.hh" #include "log.hh" -#include "serializers/json.h" +#include "serializers/json.hh" #include #include diff --git a/src/lsp.hh b/src/lsp.hh index 9b8731ee..ae1e494a 100644 --- a/src/lsp.hh +++ b/src/lsp.hh @@ -3,9 +3,9 @@ #pragma once -#include "config.h" +#include "config.hh" #include "serializer.hh" -#include "utils.h" +#include "utils.hh" #include diff --git a/src/main.cc b/src/main.cc index e6521c05..d0cd9940 100644 --- a/src/main.cc +++ b/src/main.cc @@ -3,11 +3,11 @@ #include "log.hh" #include "pipeline.hh" -#include "platform.h" +#include "platform.hh" #include "serializer.hh" -#include "serializers/json.h" -#include "test.h" -#include "working_files.h" +#include "serializers/json.hh" +#include "test.hh" +#include "working_files.hh" #include #include diff --git a/src/match.cc b/src/match.cc index 808bc180..9d3221a6 100644 --- a/src/match.cc +++ b/src/match.cc @@ -1,7 +1,7 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "match.h" +#include "match.hh" #include "lsp.hh" #include "pipeline.hh" diff --git a/src/match.h b/src/match.hh similarity index 100% rename from src/match.h rename to src/match.hh diff --git a/src/maybe.h b/src/maybe.hh similarity index 100% rename from src/maybe.h rename to src/maybe.hh diff --git a/src/message_handler.cc b/src/message_handler.cc index b860d074..7abf842f 100644 --- a/src/message_handler.cc +++ b/src/message_handler.cc @@ -4,11 +4,11 @@ #include "message_handler.hh" #include "log.hh" -#include "match.h" +#include "match.hh" #include "pipeline.hh" #include "project.hh" -#include "query_utils.h" -#include "serializers/json.h" +#include "query_utils.hh" +#include "serializers/json.hh" using namespace clang; diff --git a/src/message_handler.hh b/src/message_handler.hh index a46ff8c3..5eb7e608 100644 --- a/src/message_handler.hh +++ b/src/message_handler.hh @@ -4,7 +4,7 @@ #pragma once #include "lsp.hh" -#include "query.h" +#include "query.hh" #include #include @@ -184,7 +184,7 @@ struct MessageHandler { DB *db = nullptr; Project *project = nullptr; VFS *vfs = nullptr; - WorkingFiles *working_files = nullptr; + WorkingFiles *wfiles = nullptr; CompletionManager *clang_complete = nullptr; IncludeComplete *include_complete = nullptr; diff --git a/src/messages/ccls_call.cc b/src/messages/ccls_call.cc index 46b9044e..2cb703b4 100644 --- a/src/messages/ccls_call.cc +++ b/src/messages/ccls_call.cc @@ -4,7 +4,7 @@ #include "hierarchy.hh" #include "message_handler.hh" #include "pipeline.hh" -#include "query_utils.h" +#include "query_utils.hh" #include @@ -73,7 +73,7 @@ bool Expand(MessageHandler *m, Out_cclsCall *entry, bool callee, Out_cclsCall entry1; entry1.id = std::to_string(sym.usr); entry1.usr = sym.usr; - if (auto loc = GetLsLocation(m->db, m->working_files, + if (auto loc = GetLsLocation(m->db, m->wfiles, Use{{sym.range, sym.role}, file_id})) entry1.location = *loc; entry1.callType = call_type1; @@ -163,7 +163,7 @@ std::optional BuildInitial(MessageHandler *m, Usr root_usr, entry.usr = root_usr; entry.callType = CallType::Direct; if (def->spell) { - if (auto loc = GetLsLocation(m->db, m->working_files, *def->spell)) + if (auto loc = GetLsLocation(m->db, m->wfiles, *def->spell)) entry.location = *loc; } Expand(m, &entry, callee, call_type, qualified, levels); @@ -193,7 +193,7 @@ void MessageHandler::ccls_call(Reader &reader, ReplyOnce &reply) { if (!file) return; WorkingFile *working_file = - working_files->GetFileByFilename(file->def->path); + wfiles->GetFileByFilename(file->def->path); for (SymbolRef sym : FindSymbolsAtLocation(working_file, file, param.position)) { if (sym.kind == SymbolKind::Func) { diff --git a/src/messages/ccls_info.cc b/src/messages/ccls_info.cc index f29d2edb..119acd57 100644 --- a/src/messages/ccls_info.cc +++ b/src/messages/ccls_info.cc @@ -4,7 +4,7 @@ #include "message_handler.hh" #include "pipeline.hh" #include "project.hh" -#include "query_utils.h" +#include "query_utils.hh" namespace ccls { MAKE_REFLECT_STRUCT(QueryFile::Def, path, args, language, skipped_ranges, diff --git a/src/messages/ccls_inheritance.cc b/src/messages/ccls_inheritance.cc index ae57429d..6a206edf 100644 --- a/src/messages/ccls_inheritance.cc +++ b/src/messages/ccls_inheritance.cc @@ -4,7 +4,7 @@ #include "hierarchy.hh" #include "message_handler.hh" #include "pipeline.hh" -#include "query_utils.h" +#include "query_utils.hh" #include @@ -52,10 +52,10 @@ bool ExpandHelper(MessageHandler *m, Out_cclsInheritance *entry, bool derived, if (def) { entry->name = def->Name(qualified); if (def->spell) { - if (auto loc = GetLsLocation(m->db, m->working_files, *def->spell)) + if (auto loc = GetLsLocation(m->db, m->wfiles, *def->spell)) entry->location = *loc; } else if (entity.declarations.size()) { - if (auto loc = GetLsLocation(m->db, m->working_files, entity.declarations[0])) + if (auto loc = GetLsLocation(m->db, m->wfiles, entity.declarations[0])) entry->location = *loc; } } else if (!derived) { @@ -138,7 +138,7 @@ void Inheritance(MessageHandler *m, Param ¶m, ReplyOnce &reply) { QueryFile *file = m->FindFile(reply, param.textDocument.uri.GetPath()); if (!file) return; - WorkingFile *wfile = m->working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = m->wfiles->GetFileByFilename(file->def->path); for (SymbolRef sym : FindSymbolsAtLocation(wfile, file, param.position)) if (sym.kind == SymbolKind::Func || sym.kind == SymbolKind::Type) { diff --git a/src/messages/ccls_member.cc b/src/messages/ccls_member.cc index 9c6f087d..e3d97fb4 100644 --- a/src/messages/ccls_member.cc +++ b/src/messages/ccls_member.cc @@ -5,7 +5,7 @@ #include "hierarchy.hh" #include "message_handler.hh" #include "pipeline.hh" -#include "query_utils.h" +#include "query_utils.hh" #include #include @@ -78,7 +78,7 @@ void DoField(MessageHandler *m, Out_cclsMember *entry, const QueryVar &var, } if (def1->spell) { if (std::optional loc = - GetLsLocation(m->db, m->working_files, *def1->spell)) + GetLsLocation(m->db, m->wfiles, *def1->spell)) entry1.location = *loc; } if (def1->type) { @@ -133,13 +133,13 @@ bool Expand(MessageHandler *m, Out_cclsMember *entry, bool qualified, if (def1 && def1->spell) { // The declaration of target type. if (std::optional loc = - GetLsLocation(m->db, m->working_files, *def1->spell)) + GetLsLocation(m->db, m->wfiles, *def1->spell)) entry1.location = *loc; } else if (def->spell) { // Builtin types have no declaration but the typedef declaration // itself is useful. if (std::optional loc = - GetLsLocation(m->db, m->working_files, *def->spell)) + GetLsLocation(m->db, m->wfiles, *def->spell)) entry1.location = *loc; } if (def1 && qualified) @@ -161,10 +161,10 @@ bool Expand(MessageHandler *m, Out_cclsMember *entry, bool qualified, entry1.fieldName = def1->Name(false); if (def1->spell) { if (auto loc = - GetLsLocation(m->db, m->working_files, *def1->spell)) + GetLsLocation(m->db, m->wfiles, *def1->spell)) entry1.location = *loc; } else if (func1.declarations.size()) { - if (auto loc = GetLsLocation(m->db, m->working_files, + if (auto loc = GetLsLocation(m->db, m->wfiles, func1.declarations[0])) entry1.location = *loc; } @@ -182,10 +182,10 @@ bool Expand(MessageHandler *m, Out_cclsMember *entry, bool qualified, entry1.fieldName = def1->Name(false); if (def1->spell) { if (auto loc = - GetLsLocation(m->db, m->working_files, *def1->spell)) + GetLsLocation(m->db, m->wfiles, *def1->spell)) entry1.location = *loc; } else if (type1.declarations.size()) { - if (auto loc = GetLsLocation(m->db, m->working_files, + if (auto loc = GetLsLocation(m->db, m->wfiles, type1.declarations[0])) entry1.location = *loc; } @@ -224,7 +224,7 @@ std::optional BuildInitial(MessageHandler *m, SymbolKind kind, // Not type, |id| is invalid. entry.name = def->Name(qualified); if (def->spell) { - if (auto loc = GetLsLocation(m->db, m->working_files, *def->spell)) + if (auto loc = GetLsLocation(m->db, m->wfiles, *def->spell)) entry.location = *loc; } for (Usr usr : def->vars) { @@ -243,7 +243,7 @@ std::optional BuildInitial(MessageHandler *m, SymbolKind kind, entry.id = std::to_string(root_usr); entry.usr = root_usr; if (def->spell) { - if (auto loc = GetLsLocation(m->db, m->working_files, *def->spell)) + if (auto loc = GetLsLocation(m->db, m->wfiles, *def->spell)) entry.location = *loc; } Expand(m, &entry, qualified, levels, memberKind); @@ -274,7 +274,7 @@ void MessageHandler::ccls_member(Reader &reader, ReplyOnce &reply) { QueryFile *file = FindFile(reply, param.textDocument.uri.GetPath()); if (!file) return; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); for (SymbolRef sym : FindSymbolsAtLocation(wfile, file, param.position)) { switch (sym.kind) { diff --git a/src/messages/ccls_navigate.cc b/src/messages/ccls_navigate.cc index 7f69c380..b52d8345 100644 --- a/src/messages/ccls_navigate.cc +++ b/src/messages/ccls_navigate.cc @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "message_handler.hh" -#include "query_utils.h" +#include "query_utils.hh" namespace ccls { namespace { @@ -34,7 +34,7 @@ void MessageHandler::ccls_navigate(Reader &reader, if (!file) return; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); lsPosition ls_pos = param.position; if (wfile && wfile->index_lines.size()) if (auto line = wfile->GetIndexPosFromBufferPos(ls_pos.line, diff --git a/src/messages/ccls_reload.cc b/src/messages/ccls_reload.cc index 57c29fed..1ee03dd5 100644 --- a/src/messages/ccls_reload.cc +++ b/src/messages/ccls_reload.cc @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 #include "clang_complete.hh" -#include "match.h" +#include "match.hh" #include "message_handler.hh" #include "pipeline.hh" #include "project.hh" -#include "working_files.h" +#include "working_files.hh" #include #include @@ -28,7 +28,7 @@ void MessageHandler::ccls_reload(Reader &reader) { if (param.whitelist.empty() && param.blacklist.empty()) { vfs->Clear(); db->clear(); - project->Index(working_files, lsRequestId()); + project->Index(wfiles, lsRequestId()); clang_complete->FlushAllSessions(); return; } diff --git a/src/messages/ccls_vars.cc b/src/messages/ccls_vars.cc index edd84181..13b81752 100644 --- a/src/messages/ccls_vars.cc +++ b/src/messages/ccls_vars.cc @@ -3,7 +3,7 @@ #include "message_handler.hh" #include "pipeline.hh" -#include "query_utils.h" +#include "query_utils.hh" namespace ccls { namespace { @@ -22,7 +22,7 @@ void MessageHandler::ccls_vars(Reader &reader, ReplyOnce &reply) { QueryFile *file = FindFile(reply, param.textDocument.uri.GetPath()); if (!file) return; - WorkingFile *working_file = working_files->GetFileByFilename(file->def->path); + WorkingFile *working_file = wfiles->GetFileByFilename(file->def->path); std::vector result; for (SymbolRef sym : @@ -40,7 +40,7 @@ void MessageHandler::ccls_vars(Reader &reader, ReplyOnce &reply) { } case SymbolKind::Type: result = GetLsLocations( - db, working_files, + db, wfiles, GetVarDeclarations(db, db->Type(usr).instances, param.kind)); break; } diff --git a/src/messages/initialize.cc b/src/messages/initialize.cc index f468120b..2e4b1fd9 100644 --- a/src/messages/initialize.cc +++ b/src/messages/initialize.cc @@ -3,14 +3,14 @@ #include "clang_complete.hh" #include "filesystem.hh" -#include "include_complete.h" +#include "include_complete.hh" #include "log.hh" #include "message_handler.hh" #include "pipeline.hh" -#include "platform.h" +#include "platform.hh" #include "project.hh" -#include "serializers/json.h" -#include "working_files.h" +#include "serializers/json.hh" +#include "working_files.hh" #include #include @@ -349,7 +349,7 @@ void *Indexer(void *arg_) { std::string name = "indexer" + std::to_string(idx); set_thread_name(name.c_str()); pipeline::Indexer_Main(h->clang_complete, h->vfs, h->project, - h->working_files); + h->wfiles); return nullptr; } } // namespace @@ -445,7 +445,7 @@ void Initialize(MessageHandler *m, lsInitializeParams ¶m, ReplyOnce &reply) m->include_complete->Rescan(); LOG_S(INFO) << "dispatch initial index requests"; - m->project->Index(m->working_files, reply.id); + m->project->Index(m->wfiles, reply.id); } void MessageHandler::initialize(Reader &reader, ReplyOnce &reply) { diff --git a/src/messages/textDocument_code.cc b/src/messages/textDocument_code.cc index 0d425fd5..b96f8039 100644 --- a/src/messages/textDocument_code.cc +++ b/src/messages/textDocument_code.cc @@ -3,8 +3,8 @@ #include "message_handler.hh" #include "pipeline.hh" -#include "query_utils.h" -#include "serializers/json.h" +#include "query_utils.hh" +#include "serializers/json.hh" #include @@ -22,13 +22,13 @@ MAKE_REFLECT_STRUCT(CodeAction, title, kind, edit); void MessageHandler::textDocument_codeAction(CodeActionParam ¶m, ReplyOnce &reply) { WorkingFile *wfile = - working_files->GetFileByFilename(param.textDocument.uri.GetPath()); + wfiles->GetFileByFilename(param.textDocument.uri.GetPath()); if (!wfile) { return; } std::vector result; std::vector diagnostics; - working_files->DoAction([&]() { diagnostics = wfile->diagnostics_; }); + wfiles->DoAction([&]() { diagnostics = wfile->diagnostics_; }); for (lsDiagnostic &diag : diagnostics) if (diag.fixits_.size()) { CodeAction &cmd = result.emplace_back(); @@ -83,7 +83,7 @@ void MessageHandler::textDocument_codeLens(TextDocumentParam ¶m, QueryFile *file = FindFile(reply, path); WorkingFile *wfile = - file ? working_files->GetFileByFilename(file->def->path) : nullptr; + file ? wfiles->GetFileByFilename(file->def->path) : nullptr; if (!wfile) { return; } @@ -176,7 +176,7 @@ void MessageHandler::workspace_executeCommand(Reader &reader, std::vector result; auto Map = [&](auto &&uses) { for (auto &use : uses) - if (auto loc = GetLsLocation(db, working_files, use)) + if (auto loc = GetLsLocation(db, wfiles, use)) result.push_back(std::move(*loc)); }; switch (cmd.kind) { diff --git a/src/messages/textDocument_completion.cc b/src/messages/textDocument_completion.cc index 1e510e4e..aef6c179 100644 --- a/src/messages/textDocument_completion.cc +++ b/src/messages/textDocument_completion.cc @@ -2,12 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #include "clang_complete.hh" -#include "fuzzy_match.h" -#include "include_complete.h" +#include "fuzzy_match.hh" +#include "include_complete.hh" #include "log.hh" #include "message_handler.hh" #include "pipeline.hh" -#include "working_files.h" +#include "working_files.hh" #include #include @@ -441,7 +441,7 @@ void MessageHandler::textDocument_completion(lsCompletionParams ¶m, static CompleteConsumerCache> cache; lsCompletionList result; std::string path = param.textDocument.uri.GetPath(); - WorkingFile *file = working_files->GetFileByFilename(path); + WorkingFile *file = wfiles->GetFileByFilename(path); if (!file) { return; } diff --git a/src/messages/textDocument_definition.cc b/src/messages/textDocument_definition.cc index 05a5407e..ed77efbf 100644 --- a/src/messages/textDocument_definition.cc +++ b/src/messages/textDocument_definition.cc @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "message_handler.hh" -#include "query_utils.h" +#include "query_utils.hh" #include #include @@ -42,7 +42,7 @@ void MessageHandler::textDocument_definition(TextDocumentPositionParam ¶m, std::vector result; Maybe on_def; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); lsPosition &ls_pos = param.position; for (SymbolRef sym : FindSymbolsAtLocation(wfile, file, ls_pos, true)) { @@ -75,7 +75,7 @@ void MessageHandler::textDocument_definition(TextDocumentPositionParam ¶m, if (uses.empty() && on_def) uses.push_back(*on_def); } - auto locs = GetLsLocations(db, working_files, uses); + auto locs = GetLsLocations(db, wfiles, uses); result.insert(result.end(), locs.begin(), locs.end()); } @@ -146,7 +146,7 @@ void MessageHandler::textDocument_definition(TextDocumentPositionParam ¶m, if (best_sym.kind != SymbolKind::Invalid) { Maybe dr = GetDefinitionSpell(db, best_sym); assert(dr); - if (auto loc = GetLsLocation(db, working_files, *dr)) + if (auto loc = GetLsLocation(db, wfiles, *dr)) result.push_back(*loc); } } @@ -160,18 +160,18 @@ void MessageHandler::textDocument_typeDefinition( QueryFile *file = FindFile(reply, param.textDocument.uri.GetPath()); if (!file) return; - WorkingFile *working_file = working_files->GetFileByFilename(file->def->path); + WorkingFile *working_file = wfiles->GetFileByFilename(file->def->path); std::vector result; auto Add = [&](const QueryType &type) { for (const auto &def : type.def) if (def.spell) { - if (auto ls_loc = GetLsLocation(db, working_files, *def.spell)) + if (auto ls_loc = GetLsLocation(db, wfiles, *def.spell)) result.push_back(*ls_loc); } if (result.empty()) for (const DeclRef &dr : type.declarations) - if (auto ls_loc = GetLsLocation(db, working_files, dr)) + if (auto ls_loc = GetLsLocation(db, wfiles, dr)) result.push_back(*ls_loc); }; for (SymbolRef sym : diff --git a/src/messages/textDocument_did.cc b/src/messages/textDocument_did.cc index 5e02ac9f..5ef8adb4 100644 --- a/src/messages/textDocument_did.cc +++ b/src/messages/textDocument_did.cc @@ -2,16 +2,16 @@ // SPDX-License-Identifier: Apache-2.0 #include "clang_complete.hh" -#include "include_complete.h" +#include "include_complete.hh" #include "message_handler.hh" #include "pipeline.hh" #include "project.hh" -#include "working_files.h" +#include "working_files.hh" namespace ccls { void MessageHandler::textDocument_didChange(TextDocumentDidChangeParam ¶m) { std::string path = param.textDocument.uri.GetPath(); - working_files->OnChange(param); + wfiles->OnChange(param); if (g_config->index.onChange) pipeline::Index(path, {}, IndexMode::OnChange); clang_complete->NotifyView(path); @@ -21,13 +21,13 @@ void MessageHandler::textDocument_didChange(TextDocumentDidChangeParam ¶m) { void MessageHandler::textDocument_didClose(TextDocumentParam ¶m) { std::string path = param.textDocument.uri.GetPath(); - working_files->OnClose(param.textDocument); + wfiles->OnClose(param.textDocument); clang_complete->OnClose(path); } void MessageHandler::textDocument_didOpen(DidOpenTextDocumentParam ¶m) { std::string path = param.textDocument.uri.GetPath(); - WorkingFile *working_file = working_files->OnOpen(param.textDocument); + WorkingFile *working_file = wfiles->OnOpen(param.textDocument); if (std::optional cached_file_contents = pipeline::LoadIndexedContent(path)) working_file->SetIndexContent(*cached_file_contents); diff --git a/src/messages/textDocument_document.cc b/src/messages/textDocument_document.cc index 9142683d..b72dc13a 100644 --- a/src/messages/textDocument_document.cc +++ b/src/messages/textDocument_document.cc @@ -3,7 +3,7 @@ #include "message_handler.hh" #include "pipeline.hh" -#include "query_utils.h" +#include "query_utils.hh" #include @@ -36,7 +36,7 @@ void MessageHandler::textDocument_documentHighlight( if (!file) return; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); std::vector result; std::vector syms = @@ -50,7 +50,7 @@ void MessageHandler::textDocument_documentHighlight( return usr == sym1.usr && kind == sym1.kind; })) continue; - if (auto loc = GetLsLocation(db, working_files, sym, file_id)) { + if (auto loc = GetLsLocation(db, wfiles, sym, file_id)) { DocumentHighlight highlight; highlight.range = loc->range; if (sym.role & Role::Write) @@ -136,7 +136,7 @@ void MessageHandler::textDocument_documentSymbol(Reader &reader, QueryFile *file = FindFile(reply, param.textDocument.uri.GetPath(), &file_id); if (!file) return; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); if (!wfile) return; @@ -146,7 +146,7 @@ void MessageHandler::textDocument_documentSymbol(Reader &reader, if (refcnt > 0 && (param.all || sym.extent.Valid()) && param.startLine <= sym.range.start.line && sym.range.start.line <= param.endLine) - if (auto loc = GetLsLocation(db, working_files, sym, file_id)) + if (auto loc = GetLsLocation(db, wfiles, sym, file_id)) result.push_back(loc->range); std::sort(result.begin(), result.end()); reply(result); @@ -238,7 +238,7 @@ void MessageHandler::textDocument_documentSymbol(Reader &reader, Ignore(db->GetType(sym).AnyDef())) || (sym.kind == SymbolKind::Var && Ignore(db->GetVar(sym).AnyDef()))) continue; - if (auto loc = GetLsLocation(db, working_files, sym, file_id)) { + if (auto loc = GetLsLocation(db, wfiles, sym, file_id)) { info->location = *loc; result.push_back(*info); } diff --git a/src/messages/textDocument_foldingRange.cc b/src/messages/textDocument_foldingRange.cc index 53266cae..19258e25 100644 --- a/src/messages/textDocument_foldingRange.cc +++ b/src/messages/textDocument_foldingRange.cc @@ -4,8 +4,8 @@ #include "message_handler.hh" #include "pipeline.hh" #include "project.hh" -#include "query_utils.h" -#include "working_files.h" +#include "query_utils.hh" +#include "working_files.hh" namespace ccls { namespace { @@ -22,7 +22,7 @@ void MessageHandler::textDocument_foldingRange(TextDocumentParam ¶m, QueryFile *file = FindFile(reply, param.textDocument.uri.GetPath()); if (!file) return; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); if (!wfile) return; std::vector result; diff --git a/src/messages/textDocument_formatting.cc b/src/messages/textDocument_formatting.cc index 50987967..f81c675f 100644 --- a/src/messages/textDocument_formatting.cc +++ b/src/messages/textDocument_formatting.cc @@ -3,7 +3,7 @@ #include "message_handler.hh" #include "pipeline.hh" -#include "working_files.h" +#include "working_files.hh" #include #include @@ -75,7 +75,7 @@ void MessageHandler::textDocument_formatting(DocumentFormattingParam ¶m, QueryFile *file = FindFile(reply, param.textDocument.uri.GetPath()); if (!file) return; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); if (!wfile) return; Format(reply, wfile, {0, (unsigned)wfile->buffer_content.size()}); @@ -86,7 +86,7 @@ void MessageHandler::textDocument_onTypeFormatting( QueryFile *file = FindFile(reply, param.textDocument.uri.GetPath()); if (!file) return; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); if (!wfile) return; std::string_view code = wfile->buffer_content; @@ -102,7 +102,7 @@ void MessageHandler::textDocument_rangeFormatting( QueryFile *file = FindFile(reply, param.textDocument.uri.GetPath()); if (!file) return; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); if (!wfile) return; std::string_view code = wfile->buffer_content; diff --git a/src/messages/textDocument_hover.cc b/src/messages/textDocument_hover.cc index 6c2df0a7..a7f291e2 100644 --- a/src/messages/textDocument_hover.cc +++ b/src/messages/textDocument_hover.cc @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "message_handler.hh" -#include "query_utils.h" +#include "query_utils.hh" namespace ccls { namespace { @@ -85,12 +85,12 @@ void MessageHandler::textDocument_hover(TextDocumentPositionParam ¶m, if (!file) return; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); Hover result; for (SymbolRef sym : FindSymbolsAtLocation(wfile, file, param.position)) { std::optional ls_range = GetLsRange( - working_files->GetFileByFilename(file->def->path), sym.range); + wfiles->GetFileByFilename(file->def->path), sym.range); if (!ls_range) continue; diff --git a/src/messages/textDocument_references.cc b/src/messages/textDocument_references.cc index 2a9f4e26..d8be0be4 100644 --- a/src/messages/textDocument_references.cc +++ b/src/messages/textDocument_references.cc @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "message_handler.hh" -#include "query_utils.h" +#include "query_utils.hh" #include @@ -31,7 +31,7 @@ void MessageHandler::textDocument_references(Reader &reader, ReplyOnce &reply) { if (!file) return; std::vector result; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); if (!file) return; @@ -52,7 +52,7 @@ void MessageHandler::textDocument_references(Reader &reader, ReplyOnce &reply) { if (Role(use.role & param.context.role) == param.context.role && !(use.role & param.context.excludeRole) && seen_uses.insert(use).second) - if (auto loc = GetLsLocation(db, working_files, use)) { + if (auto loc = GetLsLocation(db, wfiles, use)) { result.push_back(*loc); } }; diff --git a/src/messages/textDocument_rename.cc b/src/messages/textDocument_rename.cc index 1d21c96e..4dd8f5e2 100644 --- a/src/messages/textDocument_rename.cc +++ b/src/messages/textDocument_rename.cc @@ -2,17 +2,17 @@ // SPDX-License-Identifier: Apache-2.0 #include "message_handler.hh" -#include "query_utils.h" +#include "query_utils.hh" namespace ccls { namespace { -lsWorkspaceEdit BuildWorkspaceEdit(DB *db, WorkingFiles *working_files, +lsWorkspaceEdit BuildWorkspaceEdit(DB *db, WorkingFiles *wfiles, SymbolRef sym, const std::string &new_text) { std::unordered_map path_to_edit; EachOccurrence(db, sym, true, [&](Use use) { std::optional ls_location = - GetLsLocation(db, working_files, use); + GetLsLocation(db, wfiles, use); if (!ls_location) return; @@ -27,7 +27,7 @@ lsWorkspaceEdit BuildWorkspaceEdit(DB *db, WorkingFiles *working_files, const std::string &path = file.def->path; path_to_edit[file_id].textDocument.uri = lsDocumentUri::FromPath(path); - WorkingFile *working_file = working_files->GetFileByFilename(path); + WorkingFile *working_file = wfiles->GetFileByFilename(path); if (working_file) path_to_edit[file_id].textDocument.version = working_file->version; } @@ -55,10 +55,10 @@ void MessageHandler::textDocument_rename(RenameParam ¶m, ReplyOnce &reply) { if (!file) return; - WorkingFile *wfile = working_files->GetFileByFilename(file->def->path); + WorkingFile *wfile = wfiles->GetFileByFilename(file->def->path); lsWorkspaceEdit result; for (SymbolRef sym : FindSymbolsAtLocation(wfile, file, param.position)) { - result = BuildWorkspaceEdit(db, working_files, sym, param.newName); + result = BuildWorkspaceEdit(db, wfiles, sym, param.newName); break; } diff --git a/src/messages/textDocument_signatureHelp.cc b/src/messages/textDocument_signatureHelp.cc index c58e42f8..dd995340 100644 --- a/src/messages/textDocument_signatureHelp.cc +++ b/src/messages/textDocument_signatureHelp.cc @@ -144,7 +144,7 @@ void MessageHandler::textDocument_signatureHelp( std::string path = param.textDocument.uri.GetPath(); lsPosition begin_pos = param.position; - if (WorkingFile *file = working_files->GetFileByFilename(path)) { + if (WorkingFile *file = wfiles->GetFileByFilename(path)) { std::string completion_text; lsPosition end_pos = param.position; begin_pos = file->FindStableCompletionSource(param.position, diff --git a/src/messages/workspace.cc b/src/messages/workspace.cc index 289896a0..c07effe3 100644 --- a/src/messages/workspace.cc +++ b/src/messages/workspace.cc @@ -2,12 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 #include "clang_complete.hh" -#include "fuzzy_match.h" +#include "fuzzy_match.hh" #include "log.hh" #include "message_handler.hh" #include "pipeline.hh" #include "project.hh" -#include "query_utils.h" +#include "query_utils.hh" #include @@ -22,7 +22,7 @@ MAKE_REFLECT_STRUCT(lsSymbolInformation, name, kind, location, containerName); void MessageHandler::workspace_didChangeConfiguration(EmptyParam &) { for (const std::string &folder : g_config->workspaceFolders) project->Load(folder); - project->Index(working_files, lsRequestId()); + project->Index(wfiles, lsRequestId()); clang_complete->FlushAllSessions(); }; @@ -31,7 +31,7 @@ void MessageHandler::workspace_didChangeWatchedFiles( DidChangeWatchedFilesParam ¶m) { for (auto &event : param.changes) { std::string path = event.uri.GetPath(); - IndexMode mode = working_files->GetFileByFilename(path) + IndexMode mode = wfiles->GetFileByFilename(path) ? IndexMode::Normal : IndexMode::NonInteractive; switch (event.type) { @@ -76,7 +76,7 @@ void MessageHandler::workspace_didChangeWorkspaceFolders( project->Load(root); } - project->Index(working_files, lsRequestId()); + project->Index(wfiles, lsRequestId()); clang_complete->FlushAllSessions(); } @@ -84,7 +84,7 @@ void MessageHandler::workspace_didChangeWorkspaceFolders( namespace { // Lookup |symbol| in |db| and insert the value into |result|. bool AddSymbol( - DB *db, WorkingFiles *working_files, SymbolIdx sym, bool use_detailed, + DB *db, WorkingFiles *wfiles, SymbolIdx sym, bool use_detailed, std::vector> *result) { std::optional info = GetSymbolInfo(db, sym, true); if (!info) @@ -100,7 +100,7 @@ bool AddSymbol( loc = decls[0]; } - std::optional ls_location = GetLsLocation(db, working_files, loc); + std::optional ls_location = GetLsLocation(db, wfiles, loc); if (!ls_location) return false; info->location = *ls_location; @@ -129,7 +129,7 @@ void MessageHandler::workspace_symbol(WorkspaceSymbolParam ¶m, std::string_view detailed_name = db->GetSymbolName(sym, true); int pos = ReverseSubseqMatch(query_without_space, detailed_name, sensitive); return pos >= 0 && - AddSymbol(db, working_files, sym, + AddSymbol(db, wfiles, sym, detailed_name.find(':', pos) != std::string::npos, &cands) && cands.size() >= g_config->workspaceSymbol.maxNum; diff --git a/src/pipeline.cc b/src/pipeline.cc index 3a920374..5bb20457 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -4,17 +4,17 @@ #include "pipeline.hh" #include "clang_complete.hh" -#include "config.h" -#include "include_complete.h" +#include "config.hh" +#include "include_complete.hh" #include "log.hh" #include "lsp.hh" -#include "match.h" +#include "match.hh" #include "message_handler.hh" #include "pipeline.hh" -#include "platform.h" +#include "platform.hh" #include "project.hh" -#include "query_utils.h" -#include "serializers/json.h" +#include "query_utils.hh" +#include "serializers/json.hh" #include #include @@ -365,12 +365,12 @@ void Indexer_Main(CompletionManager *completion, VFS *vfs, Project *project, indexer_waiter->Wait(index_request); } -void Main_OnIndexed(DB *db, WorkingFiles *working_files, IndexUpdate *update) { +void Main_OnIndexed(DB *db, WorkingFiles *wfiles, IndexUpdate *update) { if (update->refresh) { LOG_S(INFO) << "loaded project. Refresh semantic highlight for all working file."; - std::lock_guard lock(working_files->files_mutex); - for (auto &f : working_files->files) { + std::lock_guard lock(wfiles->files_mutex); + for (auto &f : wfiles->files) { std::string filename = LowerPathIfInsensitive(f->filename); if (db->name2file_id.find(filename) == db->name2file_id.end()) continue; @@ -389,7 +389,7 @@ void Main_OnIndexed(DB *db, WorkingFiles *working_files, IndexUpdate *update) { if (update->files_def_update) { auto &def_u = *update->files_def_update; if (WorkingFile *wfile = - working_files->GetFileByFilename(def_u.first.path)) { + wfiles->GetFileByFilename(def_u.first.path)) { // FIXME With index.onChange: true, use buffer_content only for // request.path wfile->SetIndexContent(g_config->index.onChange ? wfile->buffer_content @@ -475,11 +475,11 @@ void LaunchStdout() { void MainLoop() { Project project; - WorkingFiles working_files; + WorkingFiles wfiles; VFS vfs; CompletionManager clang_complete( - &project, &working_files, + &project, &wfiles, [&](std::string path, std::vector diagnostics) { lsPublishDiagnosticsParams params; params.uri = lsDocumentUri::FromPath(path); @@ -503,7 +503,7 @@ void MainLoop() { handler.db = &db; handler.project = &project; handler.vfs = &vfs; - handler.working_files = &working_files; + handler.wfiles = &wfiles; handler.clang_complete = &clang_complete; handler.include_complete = &include_complete; @@ -521,7 +521,7 @@ void MainLoop() { break; did_work = true; indexed = true; - Main_OnIndexed(&db, &working_files, &*update); + Main_OnIndexed(&db, &wfiles, &*update); } if (did_work) @@ -544,7 +544,7 @@ void Standalone(const std::string &root) { MessageHandler handler; handler.project = &project; - handler.working_files = &wfiles; + handler.wfiles = &wfiles; handler.vfs = &vfs; handler.include_complete = &complete; diff --git a/src/pipeline.hh b/src/pipeline.hh index 3e3b1861..6ac8bdf0 100644 --- a/src/pipeline.hh +++ b/src/pipeline.hh @@ -4,7 +4,7 @@ #pragma once #include "lsp.hh" -#include "query.h" +#include "query.hh" #include #include diff --git a/src/platform.h b/src/platform.hh similarity index 100% rename from src/platform.h rename to src/platform.hh diff --git a/src/platform_posix.cc b/src/platform_posix.cc index 1f848fbe..52e19fc8 100644 --- a/src/platform_posix.cc +++ b/src/platform_posix.cc @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 #if defined(__unix__) || defined(__APPLE__) -#include "platform.h" +#include "platform.hh" -#include "utils.h" +#include "utils.hh" #include #include diff --git a/src/platform_win.cc b/src/platform_win.cc index a051cd7b..c892c2bd 100644 --- a/src/platform_win.cc +++ b/src/platform_win.cc @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 #if defined(_WIN32) -#include "platform.h" +#include "platform.hh" -#include "utils.h" +#include "utils.hh" #include #include diff --git a/src/position.cc b/src/position.cc index 12748374..39f03f3f 100644 --- a/src/position.cc +++ b/src/position.cc @@ -1,7 +1,7 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "position.h" +#include "position.hh" #include "serializer.hh" diff --git a/src/position.h b/src/position.hh similarity index 97% rename from src/position.h rename to src/position.hh index a90d4c7a..67843d78 100644 --- a/src/position.h +++ b/src/position.hh @@ -3,8 +3,8 @@ #pragma once -#include "maybe.h" -#include "utils.h" +#include "maybe.hh" +#include "utils.hh" #include #include diff --git a/src/project.cc b/src/project.cc index 90315b88..f547d6a2 100644 --- a/src/project.cc +++ b/src/project.cc @@ -5,12 +5,12 @@ #include "filesystem.hh" #include "log.hh" -#include "match.h" +#include "match.hh" #include "pipeline.hh" -#include "platform.h" -#include "serializers/json.h" -#include "utils.h" -#include "working_files.h" +#include "platform.hh" +#include "serializers/json.hh" +#include "utils.hh" +#include "working_files.hh" #include #include diff --git a/src/project.hh b/src/project.hh index 92d50df4..b176f24f 100644 --- a/src/project.hh +++ b/src/project.hh @@ -3,7 +3,7 @@ #pragma once -#include "config.h" +#include "config.hh" #include "lsp.hh" #include diff --git a/src/query.cc b/src/query.cc index 8bc294c6..b29b8d1c 100644 --- a/src/query.cc +++ b/src/query.cc @@ -1,11 +1,11 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "query.h" +#include "query.hh" -#include "indexer.h" +#include "indexer.hh" #include "serializer.hh" -#include "serializers/json.h" +#include "serializers/json.hh" #include #include diff --git a/src/query.h b/src/query.hh similarity index 99% rename from src/query.h rename to src/query.hh index bccb6b1d..ad255373 100644 --- a/src/query.h +++ b/src/query.hh @@ -3,7 +3,7 @@ #pragma once -#include "indexer.h" +#include "indexer.hh" #include "serializer.hh" #include diff --git a/src/query_utils.cc b/src/query_utils.cc index d950f1d6..d1c5ff2f 100644 --- a/src/query_utils.cc +++ b/src/query_utils.cc @@ -1,7 +1,7 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "query_utils.h" +#include "query_utils.hh" #include "pipeline.hh" diff --git a/src/query_utils.h b/src/query_utils.hh similarity index 98% rename from src/query_utils.h rename to src/query_utils.hh index eb95022d..3eb1e81a 100644 --- a/src/query_utils.h +++ b/src/query_utils.hh @@ -3,8 +3,8 @@ #pragma once -#include "query.h" -#include "working_files.h" +#include "query.hh" +#include "working_files.hh" #include diff --git a/src/serializer.cc b/src/serializer.cc index 7243ea42..4bf20c5e 100644 --- a/src/serializer.cc +++ b/src/serializer.cc @@ -4,10 +4,10 @@ #include "serializer.hh" #include "filesystem.hh" -#include "indexer.h" +#include "indexer.hh" #include "log.hh" -#include "serializers/binary.h" -#include "serializers/json.h" +#include "serializers/binary.hh" +#include "serializers/json.hh" #include #include diff --git a/src/serializer.hh b/src/serializer.hh index 98614f1d..189ca855 100644 --- a/src/serializer.hh +++ b/src/serializer.hh @@ -3,7 +3,7 @@ #pragma once -#include "maybe.h" +#include "maybe.hh" #include diff --git a/src/serializers/binary.h b/src/serializers/binary.hh similarity index 100% rename from src/serializers/binary.h rename to src/serializers/binary.hh diff --git a/src/serializers/json.h b/src/serializers/json.hh similarity index 100% rename from src/serializers/json.h rename to src/serializers/json.hh diff --git a/src/test.cc b/src/test.cc index bb488e23..b7c8a2b7 100644 --- a/src/test.cc +++ b/src/test.cc @@ -1,15 +1,15 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "test.h" +#include "test.hh" #include "clang_complete.hh" #include "filesystem.hh" -#include "indexer.h" +#include "indexer.hh" #include "pipeline.hh" -#include "platform.h" +#include "platform.hh" #include "serializer.hh" -#include "utils.h" +#include "utils.hh" #include #include diff --git a/src/test.h b/src/test.hh similarity index 100% rename from src/test.h rename to src/test.hh diff --git a/src/threaded_queue.h b/src/threaded_queue.hh similarity index 99% rename from src/threaded_queue.h rename to src/threaded_queue.hh index ab514d12..5d07640c 100644 --- a/src/threaded_queue.h +++ b/src/threaded_queue.hh @@ -3,7 +3,7 @@ #pragma once -#include "utils.h" +#include "utils.hh" #include #include diff --git a/src/utils.cc b/src/utils.cc index 8cd824d0..950aef04 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -1,10 +1,10 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "utils.h" +#include "utils.hh" #include "log.hh" -#include "platform.h" +#include "platform.hh" #include diff --git a/src/utils.h b/src/utils.hh similarity index 100% rename from src/utils.h rename to src/utils.hh diff --git a/src/working_files.cc b/src/working_files.cc index 93316ded..fe8ecc83 100644 --- a/src/working_files.cc +++ b/src/working_files.cc @@ -1,10 +1,10 @@ // Copyright 2017-2018 ccls Authors // SPDX-License-Identifier: Apache-2.0 -#include "working_files.h" +#include "working_files.hh" #include "log.hh" -#include "position.h" +#include "position.hh" #include #include diff --git a/src/working_files.h b/src/working_files.hh similarity index 99% rename from src/working_files.h rename to src/working_files.hh index 09ccf31a..a268c127 100644 --- a/src/working_files.h +++ b/src/working_files.hh @@ -4,7 +4,7 @@ #pragma once #include "lsp.hh" -#include "utils.h" +#include "utils.hh" #include #include