[clang] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 15 06:38:09 PST 2024
================
@@ -3925,13 +3925,20 @@ def LifetimeCaptureByDocs : Documentation {
parameter or implicit object parameter indicates that that objects that are referred to
by that parameter may also be referred to by the capturing entity ``X``.
-By default, a reference is considered to refer to its referenced object, a
-pointer is considered to refer to its pointee, a ``std::initializer_list<T>``
-is considered to refer to its underlying array, and aggregates (arrays and
-simple ``struct``\s) are considered to refer to all objects that their
-transitive subobjects refer to.
+By default:
+
+- A reference is considered to refer to its referenced object.
+- A pointer is considered to refer to its pointee.
+- A ``std::initializer_list<T>`` is considered to refer to its underlying array.
+- Aggregates (arrays and simple ``struct``\s) are considered to refer to all
+ objects that their transitive subobjects refer to.
+- View types (types annotated with [[``gsl::Pointer()``]]) are considered to refer
----------------
usx95 wrote:
Oops. Thanks.
https://github.com/llvm/llvm-project/pull/115921
More information about the cfe-commits
mailing list