On Jun 14, 2010, at 10:11 PM, Jordy Rose wrote: > > On Mon, 14 Jun 2010 21:45:15 -0700, Ted Kremenek <kreme...@apple.com> > wrote: >> Hi Jordy, >> >> I am combing through the patch. I had a quick question. Regarding: >> >> const GRState* >> RangeConstraintManager::AssumeSymLT(const GRState* state, SymbolRef sym, >> const llvm::APSInt& Int, >> const llvm::APSInt& Adjustment) { >> ... >> // Special case for Int == Min. This is always false. >> if (Int == Min) >> return NULL; >> >> llvm::APSInt Lower = Min-Adjustment; >> llvm::APSInt Upper = Int-Adjustment; >> >> >> Are you assuming that APSInt handles overflow semantics here? >> Specifically, can't 'Min - Adjustment' overflow? Same with 'Int - >> Adjustment'. > > Yes, I am assuming that. The logic below makes sure these are used > correctly whether or not they overflow. > > Is that not a safe assumption to make about APSInt?
I think so, but it is worth testing. _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits