Skip to content

Commit

Permalink
*.h -> *.hh
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Nov 10, 2019
1 parent 3cd0ee2 commit bbce333
Show file tree
Hide file tree
Showing 66 changed files with 181 additions and 181 deletions.
16 changes: 8 additions & 8 deletions src/clang_complete.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <clang/Lex/PreprocessorOptions.h>
#include <clang/Sema/CodeCompleteConsumer.h>
Expand Down Expand Up @@ -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<std::unique_ptr<llvm::MemoryBuffer>> Bufs;
auto Clang = BuildCompilerInstance(*session, std::move(CI), FS, DC,
preamble.get(), snapshot, Bufs);
Expand Down Expand Up @@ -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<std::unique_ptr<llvm::MemoryBuffer>> Bufs;
auto Clang = BuildCompilerInstance(*session, std::move(CI), FS, DC,
preamble.get(), snapshot, Bufs);
Expand Down Expand Up @@ -564,10 +564,10 @@ std::shared_ptr<PreambleData> 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),
Expand Down Expand Up @@ -626,7 +626,7 @@ bool CompletionManager::EnsureCompletionOrCreatePreloadSession(

// No CompletionSession, create new one.
auto session = std::make_shared<ccls::CompletionSession>(
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;
Expand Down Expand Up @@ -655,7 +655,7 @@ CompletionManager::TryGetSession(const std::string &path, bool preload,
session = sessions.TryGet(path);
if (!session && !preload) {
session = std::make_shared<ccls::CompletionSession>(
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)
Expand Down
10 changes: 5 additions & 5 deletions src/clang_complete.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/FrontendActions.h>
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -129,7 +129,7 @@ struct CompletionManager {

// Global state.
Project *project_;
WorkingFiles *working_files_;
WorkingFiles *wfiles_;
OnDiagnostic on_diagnostic_;
OnDropped on_dropped_;

Expand Down
4 changes: 2 additions & 2 deletions src/clang_tu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include "clang_tu.hh"

#include "config.h"
#include "platform.h"
#include "config.hh"
#include "platform.hh"

#include <clang/AST/Type.h>
#include <clang/Lex/Lexer.h>
Expand Down
2 changes: 1 addition & 1 deletion src/clang_tu.hh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#pragma once

#include "position.h"
#include "position.hh"

#include <clang/Basic/LangOptions.h>
#include <clang/Basic/FileManager.h>
Expand Down
2 changes: 1 addition & 1 deletion src/config.cc
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "filesystem.hh"
using namespace llvm;

#include "utils.h"
#include "utils.hh"

#include <set>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion src/fuzzy_match.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2017-2018 ccls Authors
// SPDX-License-Identifier: Apache-2.0

#include "fuzzy_match.h"
#include "fuzzy_match.hh"

#include <algorithm>
#include <ctype.h>
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/include_complete.cc
Original file line number Diff line number Diff line change
@@ -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 <llvm/ADT/Twine.h>
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/indexer.cc
Original file line number Diff line number Diff line change
@@ -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 <clang/AST/AST.h>
Expand Down
6 changes: 3 additions & 3 deletions src/indexer.h → src/indexer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <clang/Basic/FileManager.h>
#include <clang/Basic/Specifiers.h>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lsp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "lsp.hh"

#include "log.hh"
#include "serializers/json.h"
#include "serializers/json.hh"

#include <algorithm>
#include <stdio.h>
Expand Down
4 changes: 2 additions & 2 deletions src/lsp.hh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#pragma once

#include "config.h"
#include "config.hh"
#include "serializer.hh"
#include "utils.h"
#include "utils.hh"

#include <rapidjson/fwd.h>

Expand Down
8 changes: 4 additions & 4 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <llvm/Support/CommandLine.h>
#include <llvm/Support/CrashRecoveryContext.h>
Expand Down
2 changes: 1 addition & 1 deletion src/match.cc
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/message_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/message_handler.hh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#pragma once

#include "lsp.hh"
#include "query.h"
#include "query.hh"

#include <functional>
#include <memory>
Expand Down Expand Up @@ -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;

Expand Down
8 changes: 4 additions & 4 deletions src/messages/ccls_call.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "hierarchy.hh"
#include "message_handler.hh"
#include "pipeline.hh"
#include "query_utils.h"
#include "query_utils.hh"

#include <unordered_set>

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -163,7 +163,7 @@ std::optional<Out_cclsCall> 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);
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/messages/ccls_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions src/messages/ccls_inheritance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "hierarchy.hh"
#include "message_handler.hh"
#include "pipeline.hh"
#include "query_utils.h"
#include "query_utils.hh"

#include <unordered_set>

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -138,7 +138,7 @@ void Inheritance(MessageHandler *m, Param &param, 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) {
Expand Down
Loading

0 comments on commit bbce333

Please sign in to comment.