[PATCH] D13643: [Sema] Warn on ternary comparison

Daniel Marjamäki via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 04:55:59 PDT 2015


danielmarjamaki added a comment.

In http://reviews.llvm.org/D13643#271885, @danielmarjamaki wrote:

> I tested this on 2199 debian projects.. and got 16 warnings.
>
>   ftp://ftp.se.debian.org/debian/pool/main/t/tf5/tf5_5.0beta8.orig.tar.gz
>   expr.c:738:22: warning: comparisons such as 'a < b != c' do not have their mathematical meaning [-Wparentheses]
>           if (neg0 == neg1 && sum<0 != neg0) {
>                               ^~~~~~~~~~~~~
>   
>
> I guess it could be intentional. I haven't looked in the real code.
>  ....


Do you have any comments on that one.


http://reviews.llvm.org/D13643





More information about the cfe-commits mailing list