Skip to content

Commit

Permalink
Workaround for clang 18 bug llvm/llvm-project#91362
Browse files Browse the repository at this point in the history
  • Loading branch information
dpoizl-atomontage committed Jul 30, 2024
1 parent cbcf92f commit 806b030
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions include/sol/function_types_stateless.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,13 @@ namespace sol { namespace function_detail {
}

template <bool is_yielding, bool no_trampoline>
static int call(lua_State* L) noexcept(std::is_nothrow_copy_assignable_v<T>) {
static int call(lua_State* L)
#if SOL_IS_ON(SOL_COMPILER_CLANG)
// apparent regression in clang 18 - llvm/llvm-project#91362
#else
noexcept(std::is_nothrow_copy_assignable_v<T>)
#endif
{
int nr;
if constexpr (no_trampoline) {
nr = real_call(L);
Expand Down Expand Up @@ -360,7 +366,13 @@ namespace sol { namespace function_detail {
}

template <bool is_yielding, bool no_trampoline>
static int call(lua_State* L) noexcept(std::is_nothrow_copy_assignable_v<T>) {
static int call(lua_State* L)
#if SOL_IS_ON(SOL_COMPILER_CLANG)
// apparent regression in clang 18 - llvm/llvm-project#91362
#else
noexcept(std::is_nothrow_copy_assignable_v<T>)
#endif
{
int nr;
if constexpr (no_trampoline) {
nr = real_call(L);
Expand Down

0 comments on commit 806b030

Please sign in to comment.