omtcyfz updated this revision to Diff 135626. omtcyfz added a comment. Addressed review comment by actually checking whether -j option was actually passed to clangd.
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,13 @@ 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() << "-j option will be ignored because -run-synchronously is " + "used.\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,13 @@ 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() << "-j option will be ignored because -run-synchronously is " + "used.\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