From: Vsevolod Stakhov Date: Thu, 27 May 2021 14:08:17 +0000 (+0100) Subject: [Minor] Fix clang plugin X-Git-Tag: 3.0~363 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72a537dbc011bcb864c800261461032dd6d00d0e;p=thirdparty%2Frspamd.git [Minor] Fix clang plugin --- diff --git a/clang-plugin/plugin.cc b/clang-plugin/plugin.cc index 6a40a62662..9236764e50 100644 --- a/clang-plugin/plugin.cc +++ b/clang-plugin/plugin.cc @@ -47,7 +47,7 @@ namespace rspamd { std::unique_ptr CreateASTConsumer (CompilerInstance &CI, llvm::StringRef) override { - return llvm::make_unique (CI); + return std::make_unique (CI); } bool ParseArgs (const CompilerInstance &CI, diff --git a/clang-plugin/printf_check.cc b/clang-plugin/printf_check.cc index 37042d47ab..e39cec8e38 100644 --- a/clang-plugin/printf_check.cc +++ b/clang-plugin/printf_check.cc @@ -157,55 +157,55 @@ namespace rspamd { switch (type) { case 's': - return llvm::make_unique (cstring_arg_handler, + return std::make_unique (cstring_arg_handler, this->pcontext, this->ci); case 'd': - return llvm::make_unique (int_arg_handler, + return std::make_unique (int_arg_handler, this->pcontext, this->ci); case 'z': - return llvm::make_unique (size_arg_handler, + return std::make_unique (size_arg_handler, this->pcontext, this->ci); case 'l': - return llvm::make_unique (long_arg_handler, + return std::make_unique (long_arg_handler, this->pcontext, this->ci); case 'f': case 'g': - return llvm::make_unique (double_arg_handler, + return std::make_unique (double_arg_handler, this->pcontext, this->ci); case 'F': case 'G': - return llvm::make_unique ( + return std::make_unique ( long_double_arg_handler, this->pcontext, this->ci); case 'c': - return llvm::make_unique (char_arg_handler, + return std::make_unique (char_arg_handler, this->pcontext, this->ci); case 'p': - return llvm::make_unique (pointer_arg_handler, + return std::make_unique (pointer_arg_handler, this->pcontext, this->ci); case 'P': - return llvm::make_unique (pid_arg_handler, + return std::make_unique (pid_arg_handler, this->pcontext, this->ci); case 't': - return llvm::make_unique (time_arg_handler, + return std::make_unique (time_arg_handler, this->pcontext, this->ci); case 'L': - return llvm::make_unique (int64_arg_handler, + return std::make_unique (int64_arg_handler, this->pcontext, this->ci); case 'D': - return llvm::make_unique (int32_arg_handler, + return std::make_unique (int32_arg_handler, this->pcontext, this->ci); case 'T': - return llvm::make_unique (tok_arg_handler, + return std::make_unique (tok_arg_handler, this->pcontext, this->ci); case 'V': - return llvm::make_unique (fstring_arg_handler, + return std::make_unique (fstring_arg_handler, this->pcontext, this->ci); case 'v': - return llvm::make_unique (gstring_arg_handler, + return std::make_unique (gstring_arg_handler, this->pcontext, this->ci); case 'e': - return llvm::make_unique (gerr_arg_handler, + return std::make_unique (gerr_arg_handler, this->pcontext, this->ci); default: { auto err_msg = std::string ("unknown parser flag: ") + type;