<div class="gmail_quote">On Sun, Jun 10, 2012 at 12:52 AM, Thomas Minor <span dir="ltr"><<a href="mailto:sxeraverx@gmail.com" target="_blank">sxeraverx@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br><br>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.<br>
</blockquote><div><br></div><div>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.</div>
<div><br></div><div>For non-overlapping edits, ordering is easy to achieve after-the-fact by applying in reverse source order.</div><div>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.</div>
<div><br></div><div>Thoughts?</div><div>/Manuel</div><div><br></div></div>