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

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 21 14:06:30 PDT 2019


xbolva00 marked an inline comment as done.
xbolva00 added inline comments.


================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:5625
+  "evaluate to 'true'">,
+  InGroup<IntInBoolContext>;
+
----------------
xbolva00 wrote:
> aaron.ballman wrote:
> > xbolva00 wrote:
> > > aaron.ballman wrote:
> > > > xbolva00 wrote:
> > > > > aaron.ballman wrote:
> > > > > > This one seems like it should be in the `TautologicalConstantCompare` group, no?
> > > > > Yes, we could move it there.
> > > > Don't *all* of these effectively boil down to a tautological comparison?
> > > So you propose put IntInBoolContext into TautologicalConstantCompare ?
> > That's what I am thinking, but I was curious if you agreed.
> But that is not enabled by -Wall :/ I would like to have this under -Wall.
I got it. Yes, we can "warn" even if no -Wall.


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

https://reviews.llvm.org/D63082





More information about the cfe-commits mailing list