isuckatcs added a comment. > Some checker should have caught the uninitialized value earlier than the > defaultEvalCall(). > I guess, the MallocCkecher could have checked for it in PreStmt<CXXNewExpr>. > Or alternatively, the CallAndMessageChecker::preCall() already does something > like this in the PreVisitProcessArg(). I know that CXXNewExpr is not a call, > but you get the idea. > WDYT, worth catching it?
I definitely think it's worth catching it. I'm working on a checker which addresses this in D131299 <https://reviews.llvm.org/D131299>. It was originally intended to be a part of MallocChecker but has been moved to a separate one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130974/new/ https://reviews.llvm.org/D130974 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits