From cfbcb327e424b18512375d44d6ca872085c633ff Mon Sep 17 00:00:00 2001 From: Harald Judt Date: Tue, 12 Mar 2024 08:51:58 +0100 Subject: [PATCH 1/3] Fix build error with clang-17 Signed-off-by: Harald Judt --- src/AST.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AST.cpp b/src/AST.cpp index 777aff7..df0fc12 100644 --- a/src/AST.cpp +++ b/src/AST.cpp @@ -242,7 +242,7 @@ Decl* C2FFIASTConsumer::make_decl(const clang::VarDecl* d, bool is_toplevel) if(d->hasInit()) { if(!d->getType()->isDependentType()) { clang::EvaluatedStmt* stmt = d->ensureEvaluatedStmt(); - clang::Expr* e = clang::cast(stmt->Value); + clang::Expr* e = clang::cast(stmt->Value); if(!e->isValueDependent() && ((v = d->evaluateValue()) || (v = d->getEvaluatedValue()))) { if(v->isLValue()) { clang::APValue::LValueBase base = v->getLValueBase(); From 54ec83b770af9f9b2ec3ed1c484180f9f474b860 Mon Sep 17 00:00:00 2001 From: Harald Judt Date: Tue, 12 Mar 2024 09:07:56 +0100 Subject: [PATCH 2/3] Fix deprecated header warnings Signed-off-by: Harald Judt --- src/AST.cpp | 2 +- src/c2ffi.cpp | 2 +- src/init.cpp | 2 +- src/options.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/AST.cpp b/src/AST.cpp index df0fc12..0934c20 100644 --- a/src/AST.cpp +++ b/src/AST.cpp @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/c2ffi.cpp b/src/c2ffi.cpp index 400d757..0ccb2e5 100644 --- a/src/c2ffi.cpp +++ b/src/c2ffi.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/src/init.cpp b/src/init.cpp index 528ff2f..56b19b2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/src/options.cpp b/src/options.cpp index 96c7ab7..cc37cee 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include "c2ffi.h" #include "c2ffi/opt.h" From 0e5b7099e851d4f47129fdbb88a19a28eb4ad961 Mon Sep 17 00:00:00 2001 From: Harald Judt Date: Tue, 12 Mar 2024 09:18:12 +0100 Subject: [PATCH 3/3] CMakeLists.txt: Bump required LLVM version Signed-off-by: Harald Judt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b97f60d..e547852 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(c2ffi) set(SOURCE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}) # Apparently the LLVM package doesn't support ranges -find_package(LLVM 16.0.0 CONFIG) +find_package(LLVM 17.0.0 CONFIG) find_package(Clang REQUIRED CONFIG) message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")