AK: Remove clang-tidy warnings for VERIFY(a || b) lines

Lines like these were getting a warning to simplify the expanded
boolean expression from `!(a || b)` to `(a && b)`, but since the
`!(...)` is part of the macro, that is never going to happen.
This commit is contained in:
Jonne Ransijn 2024-11-01 20:57:59 +01:00 committed by Andreas Kling
commit 1d8e62926f
Notes: github-actions[bot] 2024-11-09 16:56:15 +00:00

View file

@ -10,7 +10,7 @@ extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*);
#define __stringify_helper(x) #x
#define __stringify(x) __stringify_helper(x)
#define VERIFY(expr) \
(__builtin_expect(!(expr), 0) \
(__builtin_expect(/* NOLINT(readability-simplify-boolean-expr) */ !(expr), 0) \
? ak_verification_failed(#expr " at " __FILE__ ":" __stringify(__LINE__)) \
: (void)0)
#define VERIFY_NOT_REACHED() VERIFY(false) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */