[PATCH] D106102: [analyzer][solver] Introduce reasoning for not equal to operator

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 30 03:03:37 PDT 2021


steakhal added a comment.

Okay, I don't see any problems besides this typo.

BTW do you plan to implement other rules besides this in the future?
E.g. we currently miss this:
'x < y' is `true` if `max(x) < min(y)`; and `false` if `min(x) >= max(y)`
'x > y', 'x <= y', etc. in a similar way.



================
Comment at: clang/test/Analysis/constant-folding.c:478
+  if (s1 <= INT_MIN + 10 && s2 >= INT_MAX - 10) {
+    // s1: [INT_MIN,INT_MIN + 10], s2: [INT_MIN - 10,INT_MAX]
+    clang_analyzer_eval((s1 != s2) == 0); // expected-warning{{FALSE}}
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106102



More information about the cfe-commits mailing list