[PATCH] D16308: clang-tidy Enhance readability-simplify-boolean-expr check to handle implicit conversions of integral types to bool and member pointers
Richard via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 18 23:38:42 PST 2016
LegalizeAdulthood created this revision.
LegalizeAdulthood added a reviewer: alexfh.
LegalizeAdulthood added a subscriber: cfe-commits.
Expand the simplify boolean expression check to handle implicit conversion of integral types to bool
and improve the handling of implicit conversion of member pointers to bool.
Implicit conversion of member pointers are replaced with explicit comparisons to `nullptr`.
Implicit conversions of integral types are replaced with explicit comparisons to `0`.
http://reviews.llvm.org/D16308
Files:
clang-tidy/readability/SimplifyBooleanExprCheck.cpp
clang-tidy/readability/SimplifyBooleanExprCheck.h
docs/clang-tidy/checks/readability-simplify-boolean-expr.rst
test/clang-tidy/readability-simplify-bool-expr.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16308.45230.patch
Type: text/x-patch
Size: 7721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160119/cce871d5/attachment.bin>
More information about the cfe-commits
mailing list