[PATCH] D79434: [analyzer] Generalize bitwise AND rules for ranges

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 5 10:46:52 PDT 2020


vsavchenko created this revision.
vsavchenko added reviewers: NoQ, dcoughlin.
vsavchenko added a project: clang.
Herald added subscribers: cfe-commits, ASDenysPetrov, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun.
vsavchenko updated this revision to Diff 262158.
vsavchenko added a comment.
vsavchenko added a parent revision: D79336: [analyzer] Generalize bitwise OR rules for ranges.

Add parent change


Previously the current solver started reasoning about bitwise AND
expressions only when one of the operands is a constant.  However,
very similar logic could be applied to ranges.  This commit addresses
this shortcoming.  Additionally, it refines how we deal with negative
operands.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79434

Files:
  clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
  clang/test/Analysis/constant-folding.c
  clang/test/Analysis/switch-case.c
  clang/test/Analysis/uninit-exhaustive-switch-bug.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79434.262158.patch
Type: text/x-patch
Size: 12078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200505/01810d75/attachment-0001.bin>


More information about the cfe-commits mailing list