[PATCH] Enhance clang-tidy readability-simplify-boolean-expr check to handle chained conditional assignment and chained conditional return

Richard legalize at xmission.com
Sun Apr 12 21:59:45 PDT 2015


Hi alexfh,

Based on feedback from applying this tool to the clang/LLVM codebase, this changeset improves the readability-simplify-boolean-expr check so that conditional assignment or return statements at the end of a chain of if/else if statements are left unchanged unless a configuration option is supplied.

http://reviews.llvm.org/D8996

Files:
  clang-tidy/readability/SimplifyBooleanExprCheck.cpp
  clang-tidy/readability/SimplifyBooleanExprCheck.h
  test/clang-tidy/readability-simplify-bool-expr-chained-conditional-assignment.cpp
  test/clang-tidy/readability-simplify-bool-expr-chained-conditional-return.cpp
  test/clang-tidy/readability-simplify-bool-expr.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8996.23663.patch
Type: text/x-patch
Size: 9954 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150413/dc556d54/attachment.bin>


More information about the cfe-commits mailing list