chrisdangelo added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1405 -void MallocChecker::checkOwnershipAttr(const CallEvent &Call, - CheckerContext &C) const { +static const FunctionDecl *functionDeclForCall(const CallEvent &Call, + CheckerContext &C) { ---------------- NoQ wrote: > `Call.getDecl()` is intended to be the ultimate source of truth on this > subject. Thank you. This function definition has been removed and the call-site has changed to... ``` const Decl *D = Call.getDecl(); const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D); if (!FD) return; ``` ... I plan to push the above changes soon to Differential. The tests pass successfully using `ninja check-clang-analysis`. Previously, `functionDeclForCall` mimicked the existing solution using `const FunctionDecl *FD = C.getCalleeDecl(CE);`. I'm not sure what that existing solution provided differently from `Call.getDecl()`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113530/new/ https://reviews.llvm.org/D113530 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits