vsavchenko added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1409-1415
+  if ((LHS.From() > 0 && RHS.From() > 0 && Min < 0) ||
+      (LHS.From() < 0 && RHS.From() < 0 && Min > 0) ||
+      (LHS.To() > 0 && RHS.To() > 0 && Max < 0) ||
+      (LHS.To() < 0 && RHS.To() < 0 && Max > 0)) {
+    // return [Tmin, Tmax]
+    return {RangeFactory, Tmin, Tmax};
+  }
----------------
manas wrote:
> vsavchenko wrote:
> > I thought we talked quite a lot that there is nothing bad with overflows 
> > and here we have that if ANY overflow happened, we bail out and don't give 
> > any result.
> Understood! Should I replace it with code returning EmptySet()?
Why `EmptySet()`?  `EmptySet()` means that this can never happen, this path is 
infeasible.  Is that the case?
Let's say we have: `[INT_MAX - 20, INT_MAX - 10] + [30, 40]` what happens in 
this case?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103440

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to