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

Kirill Bobyrev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 24 23:12:04 PST 2018


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43671.135815.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180225/9ad9336a/attachment.bin>


More information about the cfe-commits mailing list