From a59844f720d2ae42a5832e56c80877d5edd664e0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 21 Oct 2019 12:18:55 +0100 Subject: [Minor] Clang-plugin: Continue check if callee get failed --- clang-plugin/printf_check.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'clang-plugin/printf_check.cc') diff --git a/clang-plugin/printf_check.cc b/clang-plugin/printf_check.cc index cecd845a2..35df5952d 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 (); -- cgit v1.2.3