LegalizeAdulthood marked 2 inline comments as done. ================ 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;`. /// ---------------- aaron.ballman wrote: > Perhaps a different idea regarding parens isn't to add/remove parens in > various checks for readability, but instead have two readability checks that > do different things (both disabled by default?): (1) remove spurious parens > where the presence of the parens has no effect on the order of evaluation of > the subexpressions, and (2) add parens where there is an operator precedence > difference between the operators of two subexpressions. Both of these checks > are at odds with one another (which is why I don't think it makes sense to > enable them by default), but both certainly seem like they would be useful. > > Thoughts on the general idea (not trying to sign either of us up for work to > implement it)? I'm of two minds on this, I'm not really coming down hard on either side. It feels like there should be a readability check for removing parenthesis to consolidate the heuristics all in one place and that check can in turn be configured by parameters.
http://reviews.llvm.org/D16308 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits