thakis added a comment.

>> I think I missed the workaround. I only saw the suggestion to write 0x2 
>> instead of 2 which doesn't seem more clear at all to me. Was there another 
>> fix suggestion?
> 
> Nope, you didn't miss it -- that was the suggestion. Using a hex notation is 
> the way we let programmers signify that they want to do bit fiddling.

Sorry, I don't buy that :) If I wasn't aware it's there to suppress a warning, 
if I saw `0x2` I'd think the author of that was confused about what the `0x` 
prefix does. Maybe a better fixit is to suggest `xor` instead of `^` which also 
suppresses the warning and which is imho a bit less weird. (`xor` is so rare 
that it's still a bit weird though.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66397/new/

https://reviews.llvm.org/D66397



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

Reply via email to