No behavioral change intended. The change makes iterating the replacements set more intuitive in Replacements class implementation. Previously, insertion is ordered before an deletion/replacement with the same offset, which is counter-intuitive for implementation, especially for a followup patch to support adding insertions around replacements.
With the current ordering, we only need to make applyAllReplacements iterate the replacements set reversely when applying them so that deletion/replacement is still applied before insertion with the same offset.
Maybe use auto?