[clang-tools-extra] r326051 - [clangd] Address FIXME and fix comment
Kirill Bobyrev via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 24 23:21:16 PST 2018
Author: omtcyfz
Date: Sat Feb 24 23:21:16 2018
New Revision: 326051
URL: http://llvm.org/viewvc/llvm-project?rev=326051&view=rev
Log:
[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
Modified:
clang-tools-extra/trunk/clangd/Context.cpp
clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
Modified: clang-tools-extra/trunk/clangd/Context.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Context.cpp?rev=326051&r1=326050&r2=326051&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Context.cpp (original)
+++ clang-tools-extra/trunk/clangd/Context.cpp Sat Feb 24 23:21:16 2018
@@ -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)) {}
Modified: clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp?rev=326051&r1=326050&r2=326051&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp (original)
+++ clang-tools-extra/trunk/clangd/tool/ClangdMain.cpp Sat Feb 24 23:21:16 2018
@@ -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;
More information about the cfe-commits
mailing list