summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Bobyrev <omtcyfz@gmail.com>2018-02-25 07:21:16 +0000
committerKirill Bobyrev <omtcyfz@gmail.com>2018-02-25 07:21:16 +0000
commitbcaf38051c5989e8e1a0c819a069a098bb6f08cc (patch)
tree70c9fcb15de81ccc0e2cc8a995899205cf7cde6b
parentaee341ef28eb270f9592450a07209a58dae764e7 (diff)
downloadbcm5719-llvm-bcaf38051c5989e8e1a0c819a069a098bb6f08cc.tar.gz
bcm5719-llvm-bcaf38051c5989e8e1a0c819a069a098bb6f08cc.zip
[clangd] Address FIXME and fix comment
* 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. Reviewers: ioeric Subscribers: ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43671 llvm-svn: 326051
-rw-r--r--clang-tools-extra/clangd/Context.cpp2
-rw-r--r--clang-tools-extra/clangd/tool/ClangdMain.cpp7
2 files changed, 5 insertions, 4 deletions
diff --git a/clang-tools-extra/clangd/Context.cpp b/clang-tools-extra/clangd/Context.cpp
index 7ecaced52c4..1a9ef24ff56 100644
--- a/clang-tools-extra/clangd/Context.cpp
+++ b/clang-tools-extra/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)) {}
diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp
index e35e16fafdf..00d18185275 100644
--- a/clang-tools-extra/clangd/tool/ClangdMain.cpp
+++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp
@@ -149,10 +149,11 @@ int main(int argc, char *argv[]) {
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;
OpenPOWER on IntegriCloud