================ @@ -300,6 +300,11 @@ Attribute Changes in Clang to reduce the size of the destroy functions for coroutines which are known to be destroyed after having reached the final suspend point. +- Clang now introduced ``[[clang::coro_return_type]]`` and ``[[clang::coro_wrapper]]`` + attributes. A function returning a type marked with ``[[clang::coro_return_type]]`` + should be a coroutine. A non-coroutine function marked with ``[[clang::coro_wrapper]]`` ---------------- ilya-biryukov wrote:
NIT: I suggest spelling out more aggressively what enforcement this entails. Feel free to adopt or ignore any part of the wording below, just a suggestion: ``` ... must either be a coroutine or marked as `[[clang::coro_wrapper]]`. Clang will enforce this with an error. This attribute helps analyzers to detect coroutines and opens up possibility to enforce extra invariants for certain coroutine library implementations. ``` https://github.com/llvm/llvm-project/pull/71945 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits