================
@@ -7482,3 +7482,54 @@ 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
+a **coroutine return type (CRT)**.
+
+A function ``R func(P1, .., PN)`` has a coroutine return type (CRT) ``R`` if 
``R``
+is marked by ``[[clang::coro_return_type]]`` and  ``R`` has a promise type 
associated to it
+(i.e., std​::​coroutine_traits<R, P1, .., PN>​::​promise_type is a valid 
promise type).
+
+If the return type of a function is a ``CRT`` then the function must be a 
coroutine.
+Otherwise it is invalid. It is allowed for a non-coroutine to return a ``CRT``
----------------
ChuanqiXu9 wrote:

```suggestion
Otherwise the program is invalid. It is allowed for a non-coroutine to return a 
``CRT``
```

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

Reply via email to