aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a reviewer: aaron.ballman.
================ Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.h:50 @@ -49,3 +49,3 @@ /// opposite condition. /// 4. Implicit conversions of pointer to `bool` are replaced with explicit /// comparisons to `nullptr`. ---------------- Can you also update for member pointers? ================ Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.h:77 @@ -74,3 +76,3 @@ /// implicit conversion of `i & 1` to `bool` and becomes -/// `bool b = static_cast<bool>(i & 1);`. +/// `bool b = i & 1 != 0;`. /// ---------------- To me, this does not improve readability -- I now have to think much harder about operator precedence. Including parens would help significantly, IMO, so that it becomes `(i & 1) != 0`. ================ Comment at: docs/clang-tidy/checks/readability-simplify-boolean-expr.rst:59 @@ -56,3 +58,3 @@ 4. The conditional return ``if (p) return true; return false;`` has an implicit conversion of a pointer to ``bool`` and becomes ---------------- Update for member pointers. http://reviews.llvm.org/D16308 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits