[PATCH] D43671: [clangd] Address FIXME and fix comment
Kirill Bobyrev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 23 00:55:45 PST 2018
omtcyfz created this revision.
omtcyfz added a reviewer: ioeric.
omtcyfz added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, jkorous-apple, ilya-biryukov.
- Address a FIXME by warning the user that both -run-synchronously and -j X are passed.
- Fix a comment to suppress clang-tidy warning by passing the correct argument name.
Repository:
rCTE Clang Tools Extra
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,14 @@
return 1;
}
- // Ignore -j option if -run-synchonously is used.
- // FIXME: a warning should be shown here.
- if (RunSynchronously)
+ if (RunSynchronously) {
+ if (WorkerThreadsCount != 0) {
+ llvm::errs()
+ << "-run-synchronously was used with a number of worker "
+ "threads greater than zero. Clangd will run synchronously.";
+ }
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)) {}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43671.135597.patch
Type: text/x-patch
Size: 1124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180223/3faf4b80/attachment.bin>
More information about the cfe-commits
mailing list