[PATCH] D110357: [Analyzer] Extend ConstraintAssignor to handle remainder op
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 23 11:25:59 PDT 2021
martong created this revision.
martong added reviewers: NoQ, vsavchenko, steakhal, Szelethus, ASDenysPetrov.
Herald added subscribers: manas, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, whisperity.
martong requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
`a % b != 0` implies that `a != 0` for any `a` and `b`. This patch
extends the ConstraintAssignor to do just that. In fact, we could do
something similar with division and in case of multiplications we could
have some other inferences, but I'd like to keep these for future
patches.
Fixes https://bugs.llvm.org/show_bug.cgi?id=51940
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110357
Files:
clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h
clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
clang/test/Analysis/constraint-assignor.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110357.374632.patch
Type: text/x-patch
Size: 13421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210923/b65b04f4/attachment-0001.bin>
More information about the cfe-commits
mailing list