From: Vsevolod Stakhov Date: Mon, 21 Oct 2019 11:18:55 +0000 (+0100) Subject: [Minor] Clang-plugin: Continue check if callee get failed X-Git-Tag: 2.1~60 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a59844f720d2ae42a5832e56c80877d5edd664e0;p=thirdparty%2Frspamd.git [Minor] Clang-plugin: Continue check if callee get failed --- diff --git a/clang-plugin/printf_check.cc b/clang-plugin/printf_check.cc index cecd845a2b..35df5952df 100644 --- a/clang-plugin/printf_check.cc +++ b/clang-plugin/printf_check.cc @@ -384,13 +384,15 @@ namespace rspamd { bool VisitCallExpr (CallExpr *E) { if (E->getCalleeDecl () == nullptr) { - llvm::errs () << "Bad callee\n"; - return false; + print_remark ("cannot get callee decl", + E, this->pcontext, this->ci); + return true; } auto callee = dyn_cast (E->getCalleeDecl ()); if (callee == NULL) { - llvm::errs () << "Bad callee\n"; - return false; + print_remark ("cannot get named callee decl", + E, this->pcontext, this->ci); + return true; } auto fname = callee->getNameAsString ();