[PATCH] D20857: [clang-tidy] Add modernize-explicit-operator-bool check.

Eugene Zelenko via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 2 10:22:16 PDT 2016


Eugene.Zelenko added a comment.

I think single check will be better from user's point of view.


================
Comment at: docs/clang-tidy/checks/modernize-explicit-operator-bool.rst:12
@@ +11,3 @@
+have no ``operator ==`` overloads, an implicit ``operator bool`` would allow
+``a == b`` to compile because both a and b can be implictly converted to
+``bool``.
----------------
a == b should not be highlighted, or highlighted with ` (as not language constructs). If highlighted with `, same should be done with a, b.


http://reviews.llvm.org/D20857





More information about the cfe-commits mailing list