From 3b68399cc9d47f62185834ffb0d3a0a39268f92b Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Mon, 23 Jan 2023 10:00:42 +0000 Subject: [PATCH] libafl_cc fixes for clang 16 (#1010) None constant being deprecated, it is recommended to use the std::nullopt_t type instead. --- libafl_cc/src/common-llvm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libafl_cc/src/common-llvm.h b/libafl_cc/src/common-llvm.h index d1dacf847a..b18f178ae5 100644 --- a/libafl_cc/src/common-llvm.h +++ b/libafl_cc/src/common-llvm.h @@ -19,6 +19,11 @@ typedef long double max_align_t; #define HAVE_VECTOR_INTRINSICS 1 #endif +#if LLVM_VERSION_MAJOR >= 16 + #include +constexpr std::nullopt_t None = std::nullopt; +#endif + #ifdef USE_NEW_PM #include "llvm/Passes/PassPlugin.h" #include "llvm/Passes/PassBuilder.h"