From f698620d78357f2e573dc996d9058a5f8a662a76 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Fri, 25 Oct 2024 02:57:26 +0100 Subject: [PATCH] Fix build on Clang 18.x (and maybe earlier) Signed-off-by: Andrew Clayton --- Makefile | 2 +- ngx-ast.cc | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 852ff29..183d7f3 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ CC = cc CONFIG = llvm-config -CFLAGS = $(shell ${CONFIG} --cflags) -std=c++14 -Wno-strict-aliasing -fPIC +CFLAGS = $(shell ${CONFIG} --cflags) -std=c++17 -Wno-strict-aliasing -fPIC LINK = $(CC) LDFLAGS = -fPIC -fvisibility-inlines-hidden -fno-common -g -shared diff --git a/ngx-ast.cc b/ngx-ast.cc index 8266310..1b4a7e2 100644 --- a/ngx-ast.cc +++ b/ngx-ast.cc @@ -168,27 +168,27 @@ class FindNamedClassVisitor : public RecursiveASTVisitor { const char type = flags.back(); if (flags == "FD") { - return llvm::make_unique( + return std::make_unique( int_arg_handler, this->Context, this->CI); } if (flags == "FN") { - return llvm::make_unique( + return std::make_unique( nxt_file_name_arg_handler, this->Context, this->CI); } if (flags == "PI" || flags == "PT") { - return llvm::make_unique( + return std::make_unique( pid_arg_handler, this->Context, this->CI); } if (flags == "PF") { - return llvm::make_unique( + return std::make_unique( nxt_fid_arg_handler, this->Context, this->CI); } if (flags == "PH") { - return llvm::make_unique( + return std::make_unique( pthread_arg_handler, this->Context, this->CI); }