mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-14 21:42:19 +00:00
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.
This commit is contained in:
parent
d5fbf7323a
commit
cca84aa28d
Notes:
github-actions[bot]
2024-12-04 16:47:48 +00:00
Author: https://github.com/yyny
Commit: cca84aa28d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2454
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue