[PATCH] D43671: [clangd] Address FIXME and fix comment

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 23 03:56:09 PST 2018


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)) {}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43671.135626.patch
Type: text/x-patch
Size: 1091 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180223/f15776a8/attachment.bin>


More information about the cfe-commits mailing list