ilya-biryukov added inline comments.
================ Comment at: clangd/Logger.cpp:19 Logger *L = nullptr; +bool Verbose_ = false; } // namespace ---------------- Could we move the flag to implementation of `Logger`? I.e.: ``` class Logger { virtual log(const llvm::Twine &Message, bool Verbose); }; // Implementation of top-level log void clangd::log(const llvm::Twine &Message) { L->log(Message, /*Verbose=*/false); // should also handle missing Logger by logging into llvm::errs() } // Implementation of top-level vlog. void clangd::vlog(const llvm::Twine &Message) { L->log(Message, /*Verbose=*/true); // should also handle missing Logger by logging into llvm::errs() } ``` An implementation of the interface would decide whether to log or not, based on command-line argument. ================ Comment at: clangd/tool/ClangdMain.cpp:79 +static llvm::cl::opt<bool> Verbose("verbose", llvm::cl::desc("Be more verbose"), + llvm::cl::init(false)); ---------------- Maybe just call it `-v`? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44226 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits