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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 28 10:02:15 PDT 2019


aaron.ballman added inline comments.


================
Comment at: test/SemaCXX/warn-int-in-bool-context.cpp:99
+
+  if (ans == yes || no) // expected-warning {{enum constant in boolean context}}
+    return a;
----------------
Why do we want to diagnose this case in C++ but not in C?


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

https://reviews.llvm.org/D63082





More information about the cfe-commits mailing list