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;