[PATCH] D24717: Merge deletions that are contained in a larger deletion.
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 19 07:38:20 PDT 2016
djasper added a comment.
I actually think this is a good example. So lets assume we'd write a tool to fully quote binary expressions, e.g. that turns
if (a * b + c * d == 10) ...
into
if (((a * b) + (c * d)) == 10) ...
So, here, we would be inserting two "(" and two ")" at the same locations. And, as you correctly mention, the order doesn't matter because we are inserting the same string twice. I think this is actually good behavior.
Deduplication is an interesting concern, but I think we probably want to handle that at a different layer. E.g. in the use case above, deduplicating would be quite fatal :).
https://reviews.llvm.org/D24717
More information about the cfe-commits
mailing list