[PATCH] D45601: Warn on bool* to bool conversion

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 17 05:03:54 PDT 2018


thakis added inline comments.


================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7806
+  "comparing %0 as a boolean">,
+  InGroup<Extra>;
 def warn_format_argument_needs_cast : Warning<
----------------
lebedev.ri wrote:
> Also, this really really should be under it's own flag, which in turn may be under `Extra`.
The guideline is actually "most warnings should be high-value and have next to no false positives", and because of that most warnings should be default-on. We don't have a clear guideline when to put warnings under `-Wall` instead of making them default-on, but sometimes "does the warning need to build a CFG?" is used for that. Almost nothing should be in Extra but not in All.


https://reviews.llvm.org/D45601





More information about the cfe-commits mailing list