================
@@ -12755,6 +12755,12 @@ def warn_coroutine_handle_address_invalid_return_type 
: Warning <
 def err_coroutine_promise_final_suspend_requires_nothrow : Error<
   "the expression 'co_await __promise.final_suspend()' is required to be 
non-throwing"
 >;
+def warn_coroutine_promise_initial_suspend_throw
+    : Warning<"a potentially throwing 'co_await __promise.initial_suspend()' "
+              "may disable heap allocation elision; "
+              "if it throws, the coroutine return value and state are "
+              "destroyed in the reverse order of their construction">,
----------------
ChuanqiXu9 wrote:

We need to allow the users to workaround the warning by  grammars like 
`noexcept(false)` otherwise it is annoying that users can't turn off the 
warning if the user really needs them to throw except turn off the warning all 
over. And let's mention it in the warning message.

https://github.com/llvm/llvm-project/pull/179192
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to