Skip to content

Commit 25b5e5c

Browse files
authored
Update links in AttrDocs.td for coro_lifetimebound
1 parent b98a594 commit 25b5e5c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

clang/include/clang/Basic/AttrDocs.td

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7585,11 +7585,11 @@ def CoroLifetimeBoundDoc : Documentation {
75857585
let Category = DocCatDecl;
75867586
let Content = [{
75877587
The ``[[clang::coro_lifetimebound]]`` is a class attribute which can be applied
7588-
to a `coroutine return type (CRT) <https://clang.llvm.org/docs/AttributeReference.html#coro-return-type>` _ (i.e.
7588+
to a `coroutine return type (`CRT`_) (i.e.
75897589
it should also be annotated with ``[[clang::coro_return_type]]``).
75907590

7591-
All parameters of a function are considered to be lifetime bound. See documentation
7592-
of ``[[clang::lifetimebound]]`` for more `details <https://clang.llvm.org/docs/AttributeReference.html#lifetimebound> _`.
7591+
All parameters of a function are considered to be lifetime bound. See `documentation`_
7592+
of ``[[clang::lifetimebound]]`` for more details.
75937593
if the function returns a coroutine return type (CRT) annotated with ``[[clang::coro_lifetimebound]]``.
75947594

75957595
Reference parameters of a coroutine are susceptible to capturing references to temporaries or local variables.
@@ -7606,9 +7606,8 @@ For example,
76067606
return coro(a);
76077607
}
76087608

7609-
`Lifetime bound <https://clang.llvm.org/docs/AttributeReference.html#lifetimebound> _` static analysis
7610-
can be used to detect such instances when coroutines capture references which may die earlier than the
7611-
coroutine frame itself. In the above example, if the CRT `task` is annotated with
7609+
Lifetime bound static analysis can be used to detect such instances when coroutines capture references
7610+
which may die earlier than the coroutine frame itself. In the above example, if the CRT `task` is annotated with
76127611
``[[clang::coro_lifetimebound]]``, then lifetime bound analysis would detect capturing reference to
76137612
temporaries or return address of a local variable.
76147613

@@ -7635,5 +7634,8 @@ Both coroutines and coroutine wrappers are part of this analysis.
76357634
[[clang::coro_wrapper]] Task<int> stack_reference(int a) {
76367635
return coro(a); // warning: returning address of stack variable `a`.
76377636
}
7637+
7638+
.. _`documentation`: https://clang.llvm.org/docs/AttributeReference.html#lifetimebound
7639+
.. _`CRT`: https://clang.llvm.org/docs/AttributeReference.html#coro-return-type
76387640
}];
76397641
}

0 commit comments

Comments
 (0)