aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-plugin/printf_check.cc10
1 files changed, 6 insertions, 4 deletions
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<NamedDecl> (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 ();