omtcyfz updated this revision to Diff 135815. omtcyfz marked an inline comment as done. omtcyfz added a comment.
Address Eric's nit: make warning message shorter so that it would fit into one line in order to omit braces for a single statement for compliance with the clang-tools-extra codestyle, as discussed with Alex a long while ago. https://reviews.llvm.org/D43671 Files: clangd/Context.cpp clangd/tool/ClangdMain.cpp Index: clangd/tool/ClangdMain.cpp =================================================================== --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -149,10 +149,11 @@ return 1; } - // Ignore -j option if -run-synchonously is used. - // FIXME: a warning should be shown here. - if (RunSynchronously) + if (RunSynchronously) { + if (WorkerThreadsCount.getNumOccurrences()) + llvm::errs() << "Ignoring -j because -run-synchronously is set.\n"; WorkerThreadsCount = 0; + } // Validate command line arguments. llvm::Optional<llvm::raw_fd_ostream> InputMirrorStream; Index: clangd/Context.cpp =================================================================== --- clangd/Context.cpp +++ clangd/Context.cpp @@ -13,7 +13,7 @@ namespace clang { namespace clangd { -Context Context::empty() { return Context(/*Data=*/nullptr); } +Context Context::empty() { return Context(/*DataPtr=*/nullptr); } Context::Context(std::shared_ptr<const Data> DataPtr) : DataPtr(std::move(DataPtr)) {}
Index: clangd/tool/ClangdMain.cpp =================================================================== --- clangd/tool/ClangdMain.cpp +++ clangd/tool/ClangdMain.cpp @@ -149,10 +149,11 @@ return 1; } - // Ignore -j option if -run-synchonously is used. - // FIXME: a warning should be shown here. - if (RunSynchronously) + if (RunSynchronously) { + if (WorkerThreadsCount.getNumOccurrences()) + llvm::errs() << "Ignoring -j because -run-synchronously is set.\n"; WorkerThreadsCount = 0; + } // Validate command line arguments. llvm::Optional<llvm::raw_fd_ostream> InputMirrorStream; Index: clangd/Context.cpp =================================================================== --- clangd/Context.cpp +++ clangd/Context.cpp @@ -13,7 +13,7 @@ namespace clang { namespace clangd { -Context Context::empty() { return Context(/*Data=*/nullptr); } +Context Context::empty() { return Context(/*DataPtr=*/nullptr); } Context::Context(std::shared_ptr<const Data> DataPtr) : DataPtr(std::move(DataPtr)) {}
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits