mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
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:
committed by
Andreas Kling
parent
ed6431a0b1
commit
1d8e62926f
@@ -10,7 +10,7 @@ extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*);
|
|||||||
#define __stringify_helper(x) #x
|
#define __stringify_helper(x) #x
|
||||||
#define __stringify(x) __stringify_helper(x)
|
#define __stringify(x) __stringify_helper(x)
|
||||||
#define VERIFY(expr) \
|
#define VERIFY(expr) \
|
||||||
(__builtin_expect(!(expr), 0) \
|
(__builtin_expect(/* NOLINT(readability-simplify-boolean-expr) */ !(expr), 0) \
|
||||||
? ak_verification_failed(#expr " at " __FILE__ ":" __stringify(__LINE__)) \
|
? ak_verification_failed(#expr " at " __FILE__ ":" __stringify(__LINE__)) \
|
||||||
: (void)0)
|
: (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 */
|
#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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user