[PATCH] D49074: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 9 15:37:07 PDT 2018
NoQ added inline comments.
================
Comment at: test/Analysis/constraint_manager_scale.c:78
+ assert(x * 2 < 8);
+ clang_analyzer_eval(x < 4); // expected-warning{{TRUE}}
+ clang_analyzer_eval(x < 2); // expected-warning{{UNKNOWN}}
----------------
If `int` is 32-bit and `x` equal to 2³¹ - 1, we have `x * 2` equal to `-2` which is less than 8, while `x` is greater than 4.
https://reviews.llvm.org/D49074
More information about the cfe-commits
mailing list