On Sun, Jun 10, 2012 at 12:52 AM, Thomas Minor <[email protected]> wrote:

> Hello,
>
> I would like to submit a patch to the Refactoring Tool. Currently, the
> tool relies on std::set for uniqueing edits. However, this poses problems
> for insertions (in the form of replacements of a zero-length range): they
> can be reordered arbitrarily. This patch causes them to be applied in the
> order submitted to the tool.
>

I'm not sure this is the right solution - I don't want to rely on the tool
emitting edits in the right order, because I don't see a way this can be
guaranteed when running over multiple translation units.

For non-overlapping edits, ordering is easy to achieve after-the-fact by
applying in reverse source order.
For overlapping edits, the edits would need to contain information on how
they are sequenced in a TU independent way; I don't think the sequence in
which they are emitted is a good sequence, as it restricts the tools too
much.

Thoughts?
/Manuel
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to