[PATCH] D86176: [clang-tidy] readability-simplify-boolean-expr detects negated literals
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 18 15:53:51 PDT 2020
njames93 created this revision.
njames93 added reviewers: aaron.ballman, gribozavr2, alexfh.
Herald added subscribers: cfe-commits, xazax.hun.
Herald added a project: clang.
njames93 requested review of this revision.
Adds support for detecting cases like `if (!true) ...`.
Addresses readability-simplify-boolean-expr not detected for negated boolean literals. <https://bugs.llvm.org/show_bug.cgi?id=47166>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86176
Files:
clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h
clang-tools-extra/test/clang-tidy/checkers/readability-simplify-bool-expr.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86176.286414.patch
Type: text/x-patch
Size: 9537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200818/a9d41376/attachment-0001.bin>
More information about the cfe-commits
mailing list