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

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 15 06:32:55 PDT 2015


On Thu, Oct 15, 2015 at 6:29 AM, Angel Garcia <angelgarcia at google.com>
wrote:

> 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)
>

Why? I think in the latter two cases, it is fine to keep one of them and it
doesn't really matter which one.


>
> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151015/4b058667/attachment.html>


More information about the cfe-commits mailing list