This is an archive of the discontinued LLVM Phabricator instance.

[find-all-symbols] Save relative file path for each symbol.
ClosedPublic

Authored by hokein on May 11 2016, 4:38 AM.

Details

Summary

The HeaderSearch::suggestPathToFileForDiagnostics used in include-fixer
doesn't work well with absolute file path, it assumes a relative file
path based on header searching path.

So saving relative file path to make include-fixer get the most
appropriate header path.

Diff Detail

Event Timeline

hokein updated this revision to Diff 56879.May 11 2016, 4:38 AM
hokein retitled this revision from to [find-all-symbols] Save relative file path for each symbol..
hokein updated this object.
hokein set the repository for this revision to rL LLVM.
hokein added a subscriber: cfe-commits.
hokein added inline comments.May 11 2016, 4:42 AM
include-fixer/find-all-symbols/SymbolInfo.h
81

One question is that whether should we add a BuildDir in SymbolInfo. With BuildDir, we can check the build directory in include-fixer make sure they are the same :).

bkramer accepted this revision.May 11 2016, 4:42 AM
bkramer edited edge metadata.

LG!

This revision is now accepted and ready to land.May 11 2016, 4:42 AM
bkramer added inline comments.May 11 2016, 4:43 AM
include-fixer/find-all-symbols/SymbolInfo.h
81

Hmm. If both the symbol finder and include fixer run on the same compilation database this can never happen, right?

hokein added inline comments.May 11 2016, 4:52 AM
include-fixer/find-all-symbols/SymbolInfo.h
81

Yeah. So don't do it now.

This revision was automatically updated to reflect the committed changes.