From 9a6851c6a5d1133ce326fabccccc0f08d3be0435 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 3 Nov 2018 21:48:38 -0700 Subject: [PATCH] Misc --- src/main.cc | 4 ++++ src/message_handler.hh | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main.cc b/src/main.cc index d0cd9940..59410b8e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -9,6 +9,7 @@ #include "test.hh" #include "working_files.hh" +#include #include #include #include @@ -57,6 +58,9 @@ void CloseLog() { fclose(ccls::log::file); } int main(int argc, char **argv) { TraceMe(); sys::PrintStackTraceOnErrorSignal(argv[0]); + cl::SetVersionPrinter([](raw_ostream &OS) { + OS << clang::getClangToolFullVersion("ccls") << "\n"; + }); for (auto &I : TopLevelSubCommand->OptionsMap) if (I.second->Category != &C) diff --git a/src/message_handler.hh b/src/message_handler.hh index 91108a23..a70bf413 100644 --- a/src/message_handler.hh +++ b/src/message_handler.hh @@ -9,18 +9,13 @@ #include #include #include -#include #include namespace ccls { struct CompletionManager; -struct Config; -struct GroupMatch; struct VFS; struct IncludeComplete; -struct MultiQueueWaiter; struct Project; -struct DB; struct WorkingFile; struct WorkingFiles; @@ -184,12 +179,12 @@ struct ReplyOnce { }; struct MessageHandler { + CompletionManager *clang_complete = nullptr; DB *db = nullptr; + IncludeComplete *include_complete = nullptr; Project *project = nullptr; VFS *vfs = nullptr; WorkingFiles *wfiles = nullptr; - CompletionManager *clang_complete = nullptr; - IncludeComplete *include_complete = nullptr; llvm::StringMap> method2notification; llvm::StringMap> method2request;