refactor: Set G_ABORT_ON_FAILED_ASSUME when G_FUZZING_BUILD
This does not change behavior, but documents that G_ABORT_ON_FAILED_ASSUME is set when G_FUZZING_BUILD.
This commit is contained in:
1 file changed
+2
-2
+2
-2
@@ -21,7 +21,7 @@ constexpr bool G_FUZZING_BUILD{
|
|||||||
false
|
false
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
constexpr bool G_ABORT_ON_FAILED_ASSUME{
|
constexpr bool G_ABORT_ON_FAILED_ASSUME{G_FUZZING_BUILD ||
|
||||||
#ifdef ABORT_ON_FAILED_ASSUME
|
#ifdef ABORT_ON_FAILED_ASSUME
|
||||||
true
|
true
|
||||||
#else
|
#else
|
||||||
@@ -75,7 +75,7 @@ void assertion_fail(std::string_view file, int line, std::string_view func, std:
|
|||||||
template <bool IS_ASSERT, typename T>
|
template <bool IS_ASSERT, typename T>
|
||||||
constexpr T&& inline_assertion_check(LIFETIMEBOUND T&& val, [[maybe_unused]] const char* file, [[maybe_unused]] int line, [[maybe_unused]] const char* func, [[maybe_unused]] const char* assertion)
|
constexpr T&& inline_assertion_check(LIFETIMEBOUND T&& val, [[maybe_unused]] const char* file, [[maybe_unused]] int line, [[maybe_unused]] const char* func, [[maybe_unused]] const char* assertion)
|
||||||
{
|
{
|
||||||
if (IS_ASSERT || std::is_constant_evaluated() || G_FUZZING_BUILD || G_ABORT_ON_FAILED_ASSUME) {
|
if (IS_ASSERT || std::is_constant_evaluated() || G_ABORT_ON_FAILED_ASSUME) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
assertion_fail(file, line, func, assertion);
|
assertion_fail(file, line, func, assertion);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user