[PATCH] D124806: [clang-tidy] add support for Demorgan conversions to readability-simplify-bool-expr

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 4 06:04:36 PDT 2022


njames93 created this revision.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a project: All.
njames93 updated this revision to Diff 426524.
njames93 added a comment.
njames93 updated this revision to Diff 426976.
njames93 edited the summary of this revision.
njames93 added reviewers: aaron.ballman, LegalizeAdulthood.
njames93 published this revision for review.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Small update


njames93 added a comment.

Add tracking info to prevented nested cases from emitting conflicting fixes, disabled for use cases like clangd.
Prevent emitting fixes in macro expansions.


Adds support for recognising and converting boolean expressions that can be simplified using De Morgans Law.

This is a different implementation to D124650 <https://reviews.llvm.org/D124650>.

Fixes https://github.com/llvm/llvm-project/issues/55092


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124806

Files:
  clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
  clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h
  clang-tools-extra/docs/clang-tidy/checks/readability-simplify-boolean-expr.rst
  clang-tools-extra/test/clang-tidy/checkers/readability-simplify-bool-expr-demorgan.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124806.426976.patch
Type: text/x-patch
Size: 13311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220504/ac72fec6/attachment.bin>


More information about the cfe-commits mailing list