mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-11 21:20:39 +02:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user