mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 09:21:57 -05:00
AK: Declare AK::Coroutine<T>::CoroutinePromiseBase::unhandled_exception
For some reason, Clang wants AK to work with exceptions enabled so much that it produces a very annoying warning complaining about the absence of (completely useless in our setup) unhandled_exception method in promise type for every coroutine declared. We work around this during build by suppressing -Wcoroutine-missing-unhandled-exception in Meta/CMake/common_compile_options.cmake. However, the flag is only added if build is using Clang. If one builds coroutine code with GCC but still uses clangd, clangd, obviously, doesn't pick up warning suppression and annoys user with a squiggly yellow line under each coroutine function declaration.
This commit is contained in:
parent
3d3dd46618
commit
500ff2a7ed
1 changed files with 2 additions and 0 deletions
|
@ -148,6 +148,8 @@ private:
|
|||
return { m_awaiter };
|
||||
}
|
||||
|
||||
void unhandled_exception() = delete;
|
||||
|
||||
std::coroutine_handle<> m_awaiter;
|
||||
Coroutine* m_coroutine { nullptr };
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue