diff options
author | Hendiadyoin1 <leon.a@serenityos.org> | 2022-09-13 16:02:55 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-09-13 20:55:21 +0200 |
commit | e68a35611be8bd7787894cf0cc1c407bbac531bd (patch) | |
tree | 31556cf79da3962e5ad9ae096083390291f0ce79 /Tests/LibJS | |
parent | 5bd34f115e20558476a9acb24d48119ccbb40411 (diff) | |
download | serenity-e68a35611be8bd7787894cf0cc1c407bbac531bd.zip |
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]]`.
Diffstat (limited to 'Tests/LibJS')
-rw-r--r-- | Tests/LibJS/test262-runner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/LibJS/test262-runner.cpp b/Tests/LibJS/test262-runner.cpp index c0cf102369..31890b743d 100644 --- a/Tests/LibJS/test262-runner.cpp +++ b/Tests/LibJS/test262-runner.cpp @@ -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()); |