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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to