[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

Manas Gupta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 1 23:12:34 PDT 2021


manas added inline comments.


================
Comment at: clang/test/Analysis/constant-folding.c:282
+  if (a == UINT_MAX && b == UINT_MAX) {
+    clang_analyzer_eval((a + b) >= 0); // expected-warning{{FALSE}}
+  }
----------------
manas wrote:
> xazax.hun wrote:
> > I think `UINT_MAX + UINT_MAX` supposed to be positive. Do I miss something here?
> Should not `UINT_MAX + UINT_MAX` wrap around to be negative? I think I misunderstood it.
Understood. My bad.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103440



More information about the cfe-commits mailing list