Page MenuHomePhabricator

[Support] Remove error return value from one overload of fs::make_absolute

Authored by labath on Jan 11 2019, 7:45 AM.



The version of make_absolute which accepted a specific directory to use
as the "base" for the computation could never fail, even though it
returned a std::error_code. The reason for that seems to be historical

  • the CWD flavour (which can fail due to failure to retrieve CWD) was

there first, and the new version was implemented by extending that.

This removes the error return value from the non-CWD overload and
reimplements the CWD version on top of that. This enables us to remove
some dead code where people were pessimistically trying to handle the
errors returned from this function.

Diff Detail

rC Clang

Event Timeline

labath created this revision.Jan 11 2019, 7:45 AM
sammccall accepted this revision.Jan 15 2019, 3:30 AM

Much nicer :-)

This revision is now accepted and ready to land.Jan 15 2019, 3:30 AM
This revision was automatically updated to reflect the committed changes.