This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Support dexp -c "some command"
ClosedPublic

Authored by sammccall on Apr 7 2020, 6:27 AM.

Details

Summary

It runs one command and exits.
See D77385 for motivation.

Diff Detail

Event Timeline

sammccall created this revision.Apr 7 2020, 6:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2020, 6:27 AM
kbobyrev accepted this revision.Apr 8 2020, 3:02 AM

LGTM with a couple of nits

clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
85

Nit: capitalization

100

nit: const?

328

return !runCommand(...)?

330–332

Maybe also just delete this one since there's some new code anyway.

This revision is now accepted and ready to land.Apr 8 2020, 3:02 AM
sammccall marked 4 inline comments as done.Apr 8 2020, 5:02 AM
sammccall added inline comments.
clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
100

we generally don't bother declaring local vars const.

328

I think it's unneccesarily confusing to rely on implicit bool->int conversion in a context where zero means success.

This revision was automatically updated to reflect the committed changes.