diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-21 12:18:55 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-21 12:18:55 +0100 |
commit | a59844f720d2ae42a5832e56c80877d5edd664e0 (patch) | |
tree | ea77ac46f4ee668a549b793f92887f387fc7ad53 /clang-plugin/printf_check.cc | |
parent | a59ceca26167101ac0f5e048f8bb610a6b358c2c (diff) | |
download | rspamd-a59844f720d2ae42a5832e56c80877d5edd664e0.tar.gz rspamd-a59844f720d2ae42a5832e56c80877d5edd664e0.zip |
[Minor] Clang-plugin: Continue check if callee get failed
Diffstat (limited to 'clang-plugin/printf_check.cc')
-rw-r--r-- | clang-plugin/printf_check.cc | 10 |
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 (); |