martong added a comment.
Denys, I've created a very simple patch that makes the SValBuilder to be able
to look up and use a constraint for an operand of a SymbolCast. That change
passes 2 of your test cases, thus I made that a parent patch.
================
Comment at: clang/test/Analysis/symbol-integral-cast.cpp:12-36
+void test1(int x) {
+ // Even if two lower bytes of `x` equal to zero, it doesn't mean that
+ // the entire `x` is zero. We are not able to know the exact value of x.
+ // It can be one of 65536 possible values like [0, 65536, 131072, ...]
+ // and so on. To avoid huge range sets we still assume `x` in the range
+ // [INT_MIN, INT_MAX].
+ if (!(short)x) {
----------------
These two tests are redundant because they are handled by the Parent patch I've
just created. https://reviews.llvm.org/D126481
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103096/new/
https://reviews.llvm.org/D103096
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits