[PATCH] D50256: [Analyzer] Basic support for multiplication and division in the constraint manager (for == and != only)
Balogh, Ádám via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 29 07:37:12 PDT 2019
baloghadamsoftware marked 2 inline comments as done.
baloghadamsoftware added inline comments.
================
Comment at: test/Analysis/multiplicative-folding.c:140-142
+ clang_analyzer_eval(n == -1); //expected-warning{{FALSE}}
+ clang_analyzer_eval(n == 0); //expected-warning{{TRUE}}
+ clang_analyzer_eval(n == 1); //expected-warning{{FALSE}}
----------------
NoQ wrote:
> Something's not right here. All three can potentially be true, because both `1/2 == 0` and `(-1)/2 == 0`.
Thank you for noticing this! It is strange that I forgot about 0 for `==` and `!=` but not for the rest of the comparison operators in my subsequent patch. Now I fixed it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D50256/new/
https://reviews.llvm.org/D50256
More information about the cfe-commits
mailing list