================ @@ -7482,3 +7482,51 @@ generation of the other destruction cases, optimizing the above `foo.destroy` to }]; } + + +def CoroReturnTypeAndWrapperDoc : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``coro_return_type`` attribute should be marked on a C++ class to mark it as ---------------- ilya-biryukov wrote:
I think it would be useful to clearly spell out what enforcement this attribute provides and why it's important. In particular, I propose saying something like: ``` Clang will enforce that all functions that return a CRT are either coroutines or marked with `[[clang::coro_wrapper]]`. This allows to avoid a common class of issues with lifetimes of temporaries. ``` 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