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:
Dan Klishch 2024-08-28 20:33:44 -04:00 committed by Ali Mohammad Pur
parent 3d3dd46618
commit 500ff2a7ed

View file

@ -148,6 +148,8 @@ private:
return { m_awaiter };
}
void unhandled_exception() = delete;
std::coroutine_handle<> m_awaiter;
Coroutine* m_coroutine { nullptr };
};