mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
d29d9462e9
This adds a NOLINT directive to the definition of the TODO() macro. clang-tidy wants the assert replaced with a static_assert, since the macro simply resolves to assert(false). This is obviously nonsensical, since we want the code to still compile even with TODO(). The same fix has already been implemented for VERIFY_NOT_REACHED().
17 lines
579 B
C
17 lines
579 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) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
|
#endif
|