[cfe-commits] Refactoring Tool patch submission
klimek at google.com
Sun Jun 10 03:08:50 PDT 2012
On Sun, Jun 10, 2012 at 12:52 AM, Thomas Minor <sxeraverx at gmail.com> wrote:
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits