From 7e2ee2e725286e5c34a88500e9b2203c37fd939c Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 30 Oct 2021 15:55:49 -0600 Subject: [PATCH] AK: Suppress false-positive clang-tidy warning in Assertions.h 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. --- AK/Assertions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AK/Assertions.h b/AK/Assertions.h index fbe3a86d70..cb28d8f7f4 100644 --- a/AK/Assertions.h +++ b/AK/Assertions.h @@ -11,7 +11,7 @@ #else # include # define VERIFY assert -# define VERIFY_NOT_REACHED() assert(false) +# 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