[clang] [coroutines] Introduce [[clang::coro_return_type]] and [[clang::coro_wrapper]] (PR #71945)

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 05:21:59 PST 2023


================
@@ -11591,6 +11591,10 @@ def err_conflicting_aligned_options : Error <
 def err_coro_invalid_addr_of_label : Error<
   "the GNU address of label extension is not allowed in coroutines."
 >;
+def err_coroutine_return_type : Error<
----------------
ilya-biryukov wrote:

Are there reasons to make this an error rather than a warning?

On one hand, it seems to me like something that people should be able to disable, if they really want to.
On the other hand, that's exactly the type of error that will pop up in system headers (`std::function`) and Clang disables warnings in system headers. So I can imagine this limits our flexibility.

No changes needed, I'm just curious to understand the motivation here.

https://github.com/llvm/llvm-project/pull/71945


More information about the cfe-commits mailing list