Quuxplusone added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2474-2475 auto R = std::make_unique<PathSensitiveBugReport>( - *BT_UseZerroAllocated[*CheckKind], "Use of zero-allocated memory", N); + *BT_UseZerroAllocated[*CheckKind], + "Use of memory allocated with size zero", N); ---------------- Peanut gallery says: (1) Might want to fix the typo in "Zerro" at the same time, or in a followup commit. (2) I would naively have expected all the test cases below to give something simple like "Read/write beyond end of allocated space," because they allocate N bytes and then try to read/write into byte number N. This is //never// allowed in C or C++, regardless of the value of N; there's nothing special about N=0. So I don't see why it needs //any// special diagnostic (confusing or otherwise). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111655/new/ https://reviews.llvm.org/D111655 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits