From: Vsevolod Stakhov Date: Thu, 5 Feb 2026 13:10:54 +0000 (+0000) Subject: [Fix] clang-plugin: suppress noisy remarks and fix SANITIZER macro conflict X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5aba5f497b48d98481be24f3604b1e8dc43b62d;p=thirdparty%2Frspamd.git [Fix] clang-plugin: suppress noisy remarks and fix SANITIZER macro conflict --- diff --git a/clang-plugin/printf_check.cc b/clang-plugin/printf_check.cc index 24d7de0eef..39c6b2c8e2 100644 --- a/clang-plugin/printf_check.cc +++ b/clang-plugin/printf_check.cc @@ -384,14 +384,12 @@ public: bool VisitCallExpr(CallExpr *E) { if (E->getCalleeDecl() == nullptr) { - print_remark("cannot get callee decl", - E, this->pcontext, this->ci); + /* Cannot resolve callee - skip silently (common for templates) */ return true; } auto callee = dyn_cast(E->getCalleeDecl()); if (callee == NULL) { - print_remark("cannot get named callee decl", - E, this->pcontext, this->ci); + /* Not a named decl - skip silently */ return true; } diff --git a/clang-plugin/printf_check.h b/clang-plugin/printf_check.h index 6e0b1d1657..13497b9d26 100644 --- a/clang-plugin/printf_check.h +++ b/clang-plugin/printf_check.h @@ -17,6 +17,10 @@ #define RSPAMD_PRINTF_CHECK_H #include + +/* Avoid conflict with LLVM's SANITIZER macro in Sanitizers.h */ +#undef SANITIZER + #include "clang/AST/AST.h" #include "clang/AST/RecursiveASTVisitor.h" #include "clang/Frontend/CompilerInstance.h"