]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Clang-plugin: Continue check if callee get failed
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 21 Oct 2019 11:18:55 +0000 (12:18 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 21 Oct 2019 11:18:55 +0000 (12:18 +0100)
clang-plugin/printf_check.cc

index cecd845a2b76dd02ad8aa734042be967f2d55cfd..35df5952df00de9433fbc33bd8e292e32604fe67 100644 (file)
@@ -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 ();