From 0be6603d5eb3035ef2a025fe266976448d266cd4 Mon Sep 17 00:00:00 2001 From: Jonne Ransijn Date: Fri, 15 Nov 2024 16:48:56 +0100 Subject: [PATCH] AK: Fix `ASSERT_NOT_REACHED` macro when `NDEBUG` is not defined This is supposed to be a function-like macro just like `VERIFY_NOT_REACHED()` and when `NDEBUG` is defined. --- AK/Assertions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/Assertions.h b/AK/Assertions.h index faba540fc15..7f6cdecbb0b 100644 --- a/AK/Assertions.h +++ b/AK/Assertions.h @@ -27,7 +27,7 @@ extern "C" __attribute__((noreturn)) void ak_assertion_failed(char const*); (__builtin_expect(/* NOLINT(readability-simplify-boolean-expr) */ !(__VA_ARGS__), 0) \ ? ak_assertion_failed(#__VA_ARGS__ " at " __FILE__ ":" __stringify(__LINE__)) \ : (void)0) -# define ASSERT_NOT_REACHED ASSERT(false) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */ +# define ASSERT_NOT_REACHED() ASSERT(false) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */ #else # define ASSERT(...) # define ASSERT_NOT_REACHED() __builtin_unreachable()