[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 19 14:13:18 PDT 2021


xbolva00 updated this revision to Diff 367611.
xbolva00 edited the summary of this revision.
xbolva00 added a comment.

- Only warn when both sides have potentional side effects (conversative, but covers motivating case, reduces useless noise - which may hide real bug - caused by this warning)
- Added support for bitwise | + tests.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108003/new/

https://reviews.llvm.org/D108003

Files:
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/Sema/SemaChecking.cpp
  clang/test/Sema/warn-bitwise-and-bool.c
  clang/test/Sema/warn-bitwise-or-bool.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108003.367611.patch
Type: text/x-patch
Size: 6039 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210819/d79f106c/attachment.bin>


More information about the cfe-commits mailing list