Skip to content

Commit

Permalink
*.h -> *.hh
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Dec 11, 2018
1 parent 77e1f35 commit 7817821
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 @@ -18,8 +18,8 @@ limitations under the License.
#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 @@ -417,7 +417,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 @@ -491,7 +491,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 @@ -575,10 +575,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 @@ -637,7 +637,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 @@ -666,7 +666,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 @@ -16,11 +16,11 @@ limitations under the License.
#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 @@ -108,7 +108,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 @@ -141,7 +141,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 @@ -15,8 +15,8 @@ limitations under the License.

#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 @@ -15,7 +15,7 @@ limitations under the License.

#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
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#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 @@ -16,7 +16,7 @@ limitations under the License.
#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
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#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
Expand Up @@ -13,11 +13,11 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#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
Expand Up @@ -13,14 +13,14 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#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 @@ -16,10 +16,10 @@ limitations under the License.
#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 @@ -16,7 +16,7 @@ limitations under the License.
#include "lsp.hh"

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

#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 @@ -15,9 +15,9 @@ limitations under the License.

#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 @@ -15,11 +15,11 @@ limitations under the License.

#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
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#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 @@ -16,11 +16,11 @@ limitations under the License.
#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 @@ -16,7 +16,7 @@ limitations under the License.
#pragma once

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

#include <functional>
#include <memory>
Expand Down Expand Up @@ -196,7 +196,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 @@ -16,7 +16,7 @@ limitations under the License.
#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 @@ -85,7 +85,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 @@ -175,7 +175,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 @@ -205,7 +205,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 @@ -16,7 +16,7 @@ limitations under the License.
#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 @@ -16,7 +16,7 @@ limitations under the License.
#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 @@ -64,10 +64,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 @@ -150,7 +150,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 7817821

Please sign in to comment.