This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add a fallback directory for collected symbols with relative paths.
ClosedPublic

Authored by ioeric on Jan 29 2018, 4:49 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ioeric created this revision.Jan 29 2018, 4:49 AM
sammccall accepted this revision.Jan 29 2018, 6:07 AM
sammccall added inline comments.
clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp
41 ↗(On Diff #131771)

I have trouble understanding this.

"fallback dir" is maybe too vague a name for this flag - "assume-header-directory" or "header-base-dir" or something?

The description assumes some context about the problem - can we provide it?
Maybe:

The index includes the header that a symbol is defined in.
If the absolute path cannot be determined (e.g. an in-memory VFS) then
the relative path is resolved against this directory, which must be absolute.
If this flag is not given, such headers will have relative paths.
42 ↗(On Diff #131771)

nit: i.e -> e.g

113 ↗(On Diff #131771)

wrong flag name :-)

This revision is now accepted and ready to land.Jan 29 2018, 6:07 AM
ioeric updated this revision to Diff 131799.Jan 29 2018, 7:14 AM
ioeric marked 3 inline comments as done.
  • Addressed review comments.
ioeric added inline comments.Jan 29 2018, 7:14 AM
clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp
41 ↗(On Diff #131771)

Thanks for the suggestion! Let's go with --assume-header-dir.

This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.