Explorar o código

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.
Andrew Kaster %!s(int64=3) %!d(string=hai) anos
pai
achega
7e2ee2e725
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      AK/Assertions.h

+ 1 - 1
AK/Assertions.h

@@ -11,7 +11,7 @@
 #else
 #    include <assert.h>
 #    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