From ac09b085ff3d0d9be1c5563a954d0f7c2d4a8253 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 ++------- src/pipeline.cc | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main.cc b/src/main.cc index 606e7ca1..8dc5f95f 100644 --- a/src/main.cc +++ b/src/main.cc @@ -21,6 +21,7 @@ limitations under the License. #include "test.hh" #include "working_files.hh" +#include #include #include #include @@ -69,6 +70,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; diff --git a/src/pipeline.cc b/src/pipeline.cc index 40873b2f..f3e16906 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -566,7 +566,7 @@ void Standalone(const std::string &root) { int entries = 0; for (auto &[_, folder] : project.root2folder) entries += folder.entries.size(); - printf("entries: %5d\n", entries); + printf("entries: %5d\n", entries); } while (1) { (void)on_indexed->DequeueAll();