"FWIW I found the "always evaluates to 'true'" bit important to
understand the warning."

Yeah. I moved this check somewhere else, so we can print precise message:
r373973 should emit "bitwise negation of a boolean expression always
evaluates to 'true'; did you mean logical negation?" where possible.
In the suspicious case like int i = ~b there is a general message
"bitwise negation of a boolean expression; did you mean logical
negation?".

I like it now. What do you think? fine for you?

po 7. 10. 2019 o 17:29 Dávid Bolvanský <david.bolvan...@gmail.com> napísal(a):
>
> Typo was fixed some days ago :)
>
> Odoslané z iPhonu
>
> Dňa 7. 10. 2019 o 17:22 užívateľ Arthur O'Dwyer <arthur.j.odw...@gmail.com> 
> napísal:
>
> 
> On Mon, Oct 7, 2019 at 10:59 AM Dávid Bolvanský via cfe-commits 
> <cfe-commits@lists.llvm.org> wrote:
>>
>> Okey, I will see what I can do (I know I need to move checking code 
>> somewhere else).
>>
>> > Dňa 7. 10. 2019 o 16:54 užívateľ Nico Weber <tha...@chromium.org> napísal:
>> > FWIW I found the "always evaluates to 'true'" bit important to understand 
>> > the warning.
>
>
> +1, I think "always evaluates to true" is useful, especially for people who 
> don't immediately intuit the difference between "bitwise negation" and 
> "logical negation." (Although the fixit will help clear up the difference.)
>
> Also, Dávid, you misspelled "logical" as "logicial" in the patch I saw. So 
> you might need to push a fix for that typo, unless you already caught it.
> My suggested message follows—
>
> -  "bitwise negation of a boolean expression; did you mean a logicial 
> negation?">,
> +  "bitwise negation of a boolean expression is always true; did you mean 
> logical negation?">,
>
> my $.02,
> –Arthur
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to