zaks.anna accepted this revision. zaks.anna added a comment. This revision is now accepted and ready to land.
See the suggestion for an improved comment. Otherwise, LGTM! Thanks! Anna. ================ Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:902 @@ +901,3 @@ + } else { + // Case of zero-size realloc. Historically 'realloc(ptr, 0)' is treated as + // 'free(ptr)' and the returned value from 'realloc(ptr, 0)' is not ---------------- "Historically 'realloc(ptr, 0)' is treated as 'free(ptr)' and the returned value from 'realloc(ptr, 0)' is not tracked." -> "The value returned from 'realloc(ptr, 0)' is not tracked since historically 'realloc(ptr, 0)' is treated as 'free(ptr)' and the analyzer supports that model. However, we want to report uses of zero-allocated memory that get returned by realloc." http://reviews.llvm.org/D9040 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits