Page MenuHomePhabricator

Make llvm::Error generated from replacement interfaces more specific.

Authored by ioeric on Nov 18 2016, 6:59 AM.



The new error information contains the type of error (e.g. overlap or bad file path)
and the replacement(s) that is causing the error. This enables us to resolve some errors.
For example, for insertion at the same location conflict, we need to know the
existing replacement which conflicts with the new replacement in order to calculate
the new position to be insert before/after the existing replacement (for merging).

Diff Detail


Event Timeline

ioeric updated this revision to Diff 78519.Nov 18 2016, 6:59 AM
ioeric retitled this revision from to Make llvm::Error generated from replacement interfaces more specific..
ioeric updated this object.
ioeric added reviewers: klimek, djasper, bkramer.
ioeric added a subscriber: cfe-commits.
ioeric removed a reviewer: djasper.Nov 21 2016, 6:55 AM
ioeric added a subscriber: djasper.
bkramer added inline comments.Nov 21 2016, 8:58 AM
157 ↗(On Diff #78519)

Can you use pass by value and std::move here?

162 ↗(On Diff #78519)

Here too.

174 ↗(On Diff #78519)

This on the other hand should return a const ref.

178 ↗(On Diff #78519)

This too.

157 ↗(On Diff #78519)

Drop the 's here.

ioeric updated this revision to Diff 78733.Nov 21 2016, 9:13 AM
ioeric marked 5 inline comments as done.
  • Addressed review comments.

Thanks for the review!

bkramer accepted this revision.Nov 21 2016, 9:50 AM
bkramer edited edge metadata.
This revision is now accepted and ready to land.Nov 21 2016, 9:50 AM
This revision was automatically updated to reflect the committed changes.