[PATCH] D13516: Fix overlapping replacements in clang-tidy.

Angel Garcia via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 06:29:21 PDT 2015


angelgarcia added a comment.

I cannot find a way to make Daniel's idea work with equal intervals:

In this case, fix A can be applied because B is completely contained inside
it.
A: [a, b)[c, d)
B: [a, b)

This time, we should not apply anyone:
A: [a, b)
B: [a, b)

And here they both have to be discarded again, but for a different reason:
A:        [a, b)[c, d)
B: [e, f)[a, b)

The problem is that we have three completely different situations that are
the same from the point of view of interval "[a, b)". The local situation
of individual intervals doesn't provide enough information.


http://reviews.llvm.org/D13516





More information about the cfe-commits mailing list