mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
7e2ee2e725
The definition of VERIFY_NOT_REACHED() as `assert(false)` causes the tool to suggest converting it to a static_assert. Which doesn't make any sense in context for what the macro is trying to do: crash the program at runtime.
18 lines
464 B
C
18 lines
464 B
C
/*
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#if defined(KERNEL)
|
|
# include <Kernel/Assertions.h>
|
|
#else
|
|
# include <assert.h>
|
|
# define VERIFY assert
|
|
# define VERIFY_NOT_REACHED() assert(false) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
|
static constexpr bool TODO = false;
|
|
# define TODO() VERIFY(TODO)
|
|
#endif
|