This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Address FIXME and fix comment
ClosedPublic

Authored by omtcyfz on Feb 23 2018, 12:53 AM.

Details

Summary
  • 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.

Diff Detail

Repository
rL LLVM

Event Timeline

omtcyfz created this revision.Feb 23 2018, 12:53 AM

Thanks for the cleanup Kirill :)

clangd/tool/ClangdMain.cpp
153 ↗(On Diff #135597)

-j is non-zero by default, and we shouldn't show warning if users only specify -run-synchronously. We should only warn if user explicitly set worker count while also providing -run-synchronously.

omtcyfz updated this revision to Diff 135626.EditedFeb 23 2018, 3:56 AM

Addressed review comment by checking whether -j option was actually passed to clangd.

omtcyfz marked an inline comment as done.Feb 23 2018, 3:57 AM
omtcyfz added inline comments.
clangd/tool/ClangdMain.cpp
153 ↗(On Diff #135597)

Oh, you're correct, I should've been more careful. This should be fine now.

omtcyfz marked an inline comment as done.Feb 23 2018, 3:57 AM
ioeric accepted this revision.Feb 24 2018, 1:48 PM

Oops, just realized I forgot to push the "send" button!

clangd/tool/ClangdMain.cpp
153 ↗(On Diff #135626)

nit: no need for braces around one liners.

To make this an real one line, maybe "Ignoring -j because -run-synchronously is set.\n"?

This revision is now accepted and ready to land.Feb 24 2018, 1:48 PM
omtcyfz updated this revision to Diff 135815.Feb 24 2018, 11:11 PM
omtcyfz marked an inline comment as done.

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.

This revision was automatically updated to reflect the committed changes.