[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 27 05:31:01 PDT 2019


xbolva00 added a comment.

“Perhaps appending something about the resulting value always being true|false would help most of these diagnostics be more obvious”

I dont know, this could only diagnose constant multiplications (maybe this is already handled by some “always true” check). Anyway, I have no motivation to diagnose constant muls, sorry. My goal is to make this warning atleast as good as GCC’s implementation.

Okay, we could make it better and append “; did you mean “index * 3 != 0”?


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

https://reviews.llvm.org/D63082





More information about the cfe-commits mailing list