From 35d9056ec4d837f4a58f8e6a38bec2c8ddb1352e Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Wed, 13 Dec 2023 15:48:34 +0100 Subject: [PATCH] Thunks: Build fix for clang versions older than 15 Returning incomplete types from deleted functions is valid C++, but clang did not support it until version 15: https://github.com/llvm/llvm-project/issues/52802 --- ThunkLibs/Generator/gen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ThunkLibs/Generator/gen.cpp b/ThunkLibs/Generator/gen.cpp index 48a823c5ab..e5c735b1f8 100644 --- a/ThunkLibs/Generator/gen.cpp +++ b/ThunkLibs/Generator/gen.cpp @@ -174,7 +174,7 @@ void GenerateThunkLibsAction::EmitLayoutWrappers( // Disallow use of layout wrappers for this type by specializing without a definition fmt::print(file, "template<>\nstruct guest_layout<{}>;\n", struct_name); fmt::print(file, "template<>\nstruct host_layout<{}>;\n", struct_name); - fmt::print(file, "guest_layout<{}> to_guest(const host_layout<{}>&) = delete;\n", struct_name, struct_name); + fmt::print(file, "guest_layout<{}>& to_guest(const host_layout<{}>&) = delete;\n", struct_name, struct_name); continue; }