---------------------------------------- > Date: Mon, 17 Aug 2015 21:39:32 +0000 > To: hiradi...@msn.com; jordan_r...@apple.com; kreme...@apple.com; > daniel.marjam...@evidente.se; mclow.li...@gmail.com; adasg...@codeaurora.org; > zaks.a...@gmail.com > From: zaks.a...@gmail.com > CC: cfe-commits@lists.llvm.org > Subject: Re: [PATCH] D9924: Ignore report when the argument to malloc is > assigned known value > > zaks.anna added a comment. > >> Maybe, I should add a check that `a, b, n' are positive. > >> So, in this case static analyzer can choose to be strict and reject false >> positives. > > > What would this buy us? Does the checker warn on underflow?
I mean, checking `a,b,n' are positive would ensure that there is no overflow in this case and then we would not emit report. The checker does not warn on underflow, so we can ignore checking `a,b,n' are positive, if it is too complicated. > >> If a' might overflow, then in this case we can emit warning stating that the >> overflow is caused because a' might overflow. > > > I see your point now! I think we should improve the diagnostic that is > produced in this case! I'm trying to implement that. Thanks, -Aditya > > > http://reviews.llvm.org/D9924 > > > _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits