rnkovacs added inline comments.
================ Comment at: lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp:213 + if (const auto *FC = dyn_cast<AnyFunctionCall>(&Call)) { + const FunctionDecl *FD = FC->getDecl(); + for (unsigned I = 0, E = FD->getNumParams(); I != E; ++I) { ---------------- xazax.hun wrote: > I am not sure if we always have a `Decl` here, I am afraid this might return > null sometimes. Please add a test case with a function pointer (received as > an argument in a top level function). Um, yes, I'd already seen a crash here on a project before I saw your comment. Thanks! ================ Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2934 + } else if (const auto *CallE = dyn_cast<CallExpr>(S)) { + OS << CallE->getDirectCallee()->getNameAsString(); } ---------------- xazax.hun wrote: > I think `getDirectCallee` might fail and return `nullptr`. One more reason to > test function pointers :) You're right. Also, it needed a bit more effort to dig up the function pointer's name. Or should I go further and somehow find out the name of the function it points to? https://reviews.llvm.org/D49656 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits