[PATCH] D9924: Ignore report when the argument to malloc is assigned known value

Anna Zaks via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 17 14:39:32 PDT 2015


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?

> 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!


http://reviews.llvm.org/D9924





More information about the cfe-commits mailing list