================
@@ -52,3 +52,33 @@ captures or ensuring the lambda closure object has a 
guaranteed lifetime.
 
 Following these guidelines can help ensure the safe and reliable use of
 coroutine lambdas in C++ code.
+
+Options
+-------
+
+.. option:: AllowExplicitObjectParameters
+
+   When set to `true`, lambda coroutines that use C++23 "deducing this"
+   (explicit object parameter, e.g. ``this auto``) are not flagged by this
+   check, because the captures are moved into the coroutine frame, decoupling
+   their lifetime from the lambda object.
+
+   Default is `false`.
+
+   The example from above can be made safe and will pass this check with the
+   following change:
+
+.. code-block:: c++
----------------
vbvictor wrote:

Need 2-ident to render inside options section
```suggestion
  .. code-block:: c++
```

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

Reply via email to