mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-10-26 14:57:54 +03:00
LibJS: Mark test262's __assert_fail as extern "C"
and use
...`__attribute__((__noreturn__))` This is more inline with the definition in glibc's version of the file, and stops clang from complaining about it originally not being declared as `[[no_return]]`.
This commit is contained in:
parent
5bd34f115e
commit
e68a35611b
Notes:
sideshowbarker
2024-07-17 07:12:36 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/e68a35611b Pull-request: https://github.com/SerenityOS/serenity/pull/15228 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/davidot ✅
@ -550,7 +550,7 @@ void __assertion_failed(char const* assertion)
|
||||
handle_failed_assert(assertion);
|
||||
}
|
||||
#else
|
||||
[[noreturn]] void __assert_fail(char const* assertion, char const* file, unsigned int line, char const* function)
|
||||
extern "C" __attribute__((__noreturn__)) void __assert_fail(char const* assertion, char const* file, unsigned int line, char const* function)
|
||||
{
|
||||
auto full_message = String::formatted("{}:{}: {}: Assertion `{}' failed.", file, line, function, assertion);
|
||||
handle_failed_assert(full_message.characters());
|
||||
|
Loading…
Reference in New Issue
Block a user