[PATCH] D50256: [Analyzer] Basic support for multiplication and division in the constraint manager (for == and != only)

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 26 15:51:43 PDT 2019


NoQ 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}}
----------------
Something's not right here. All three can potentially be true, because both `1/2 == 0` and `(-1)/2 == 0`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D50256/new/

https://reviews.llvm.org/D50256





More information about the cfe-commits mailing list