This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Adjust compile flags to contain only the requested file as input
ClosedPublic

Authored by kadircet on Jul 23 2021, 2:11 AM.

Diff Detail

Event Timeline

kadircet created this revision.Jul 23 2021, 2:11 AM
kadircet requested review of this revision.Jul 23 2021, 2:11 AM
sammccall accepted this revision.Jul 23 2021, 6:18 AM
sammccall added inline comments.
clang-tools-extra/clangd/CompileCommands.cpp
221

Is this because we're not meant to be parsing argv0?
Maybe check that and fix that here if so, or leave a FIXME if we don't want to check now?

223

nit: Fairly sure this is copying File twice, init-lists are dumb. maybe just two push_backs instead?

This revision is now accepted and ready to land.Jul 23 2021, 6:18 AM
kadircet updated this revision to Diff 361193.Jul 23 2021, 7:19 AM
kadircet marked 2 inline comments as done.
  • push_back instead of insert
  • don't parse argv[0] rather than skipping it
This revision was landed with ongoing or failed builds.Jul 23 2021, 8:16 AM
This revision was automatically updated to reflect the committed changes.