refactor: Mark assertion_fail as [[noreturn]]

Found by Sjors in https://github.com/bitcoin/bitcoin/pull/35896#discussion_r3723634042

This should also fix GCC warnings such as https://github.com/bitcoin/bitcoin/pull/35896#issuecomment-5197419300
This commit is contained in:
MarcoFalke
2026-08-06 09:16:27 +02:00
parent faec059dfe
commit fa588e9e0f

View File

@@ -64,8 +64,8 @@ public:
NonFatalCheckError(std::string_view msg, const std::source_location& loc);
};
/** Internal helper */
void assertion_fail(const std::source_location& loc, std::string_view assertion);
/// Internal helper. The noreturn enables optimizers to discard invalid paths.
[[noreturn]] void assertion_fail(const std::source_location& loc, std::string_view assertion);
/** Helper for CHECK_NONFATAL() */
template <typename T>