From 6517f9f1434bef30167b8a3cb9b1a4bbb166fec1 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 d1d81ddc..a24979df 100644 --- a/src/message_handler.hh +++ b/src/message_handler.hh @@ -21,18 +21,13 @@ limitations under the License. #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; @@ -196,12 +191,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;