From 8bd8583bc7a430eeee0f5d5e5cb502158419a500 Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Sun, 23 Oct 2022 00:11:44 +0200 Subject: [PATCH] Try to please clang with convoluted templates --- src/libexpr/eval.cc | 6 ------ src/libexpr/eval.hh | 6 +++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index bd102b186..3b8c0b9c1 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -465,12 +465,6 @@ ErrorBuilder & ErrorBuilder::withFrame(const Env & env, co return *this; } -template -void ErrorBuilder::debugThrow() { - // NOTE: We always use the -LastTrace version as we push the new trace in withFrame() - state.debugThrowLastTrace(ErrorType(info)); -} - EvalState::EvalState( const Strings & _searchPath, diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index ff407d090..5e88eb950 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -124,7 +124,11 @@ class ErrorBuilder ErrorBuilder & withFrame(const Env & e, const Expr & ex); [[gnu::noinline, gnu::noreturn]] - void debugThrow(); + void ErrorBuilder::debugThrow() { + // NOTE: We always use the -LastTrace version as we push the new trace in withFrame() + state.debugThrowLastTrace(ErrorType(info)); + } + };