[PATCH] [analyzer] Make realloc(ptr, 0) handling equivalent to malloc(0).

Anna Zaks zaks.anna at gmail.com
Thu May 14 18:13:56 PDT 2015


C89 says: "If size is zero and ptr is not a null pointer, the object it points to is freed." I believe C89 and C99 disagree here.

I don't think we should add warnings for code that follows C89.


http://reviews.llvm.org/D9040

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list