Skip to content

Commit 1891d21

Browse files
committed
[clang-tidy][DOC] Fix syntax in coroutine-hostile-raii.rst
Fix ':4:Title underline too short.'
1 parent ecd3934 commit 1891d21

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clang-tools-extra/docs/clang-tidy/checks/misc/coroutine-hostile-raii.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
.. title:: clang-tidy - misc-coroutine-hostile-raii
22

33
misc-coroutine-hostile-raii
4-
====================
4+
===========================
55

66
Detects when objects of certain hostile RAII types persists across suspension
77
points in a coroutine. Such hostile types include scoped-lockable types and
88
types belonging to a configurable denylist.
99

10-
Some objects require that they be destroyed on the same thread that created them.
10+
Some objects require that they be destroyed on the same thread that created them.
1111
Traditionally this requirement was often phrased as "must be a local variable",
1212
under the assumption that local variables always work this way. However this is
1313
incorrect with C++20 coroutines, since an intervening ``co_await`` may cause the
1414
coroutine to suspend and later be resumed on another thread.
1515

16-
The lifetime of an object that requires being destroyed on the same thread must
16+
The lifetime of an object that requires being destroyed on the same thread must
1717
not encompass a ``co_await`` or ``co_yield`` point. If you create/destroy an object,
1818
you must do so without allowing the coroutine to suspend in the meantime.
1919

2020
Following types are considered as hostile:
2121

2222
- Scoped-lockable types: A scoped-lockable object persisting across a suspension
23-
point is problematic as the lock held by this object could be unlocked by a
23+
point is problematic as the lock held by this object could be unlocked by a
2424
different thread. This would be undefined behaviour.
2525
This includes all types annotated with the ``scoped_lockable`` attribute.
2626

@@ -44,7 +44,7 @@ Options
4444

4545
.. option:: RAIITypesList
4646

47-
A semicolon-separated list of qualified types which should not be allowed to
47+
A semicolon-separated list of qualified types which should not be allowed to
4848
persist across suspension points.
4949
Eg: ``my::lockable; a::b;::my::other::lockable;``
50-
The default value of this option is `"std::lock_guard;std::scoped_lock"`.
50+
The default value of this option is `"std::lock_guard;std::scoped_lock"`.

0 commit comments

Comments
 (0)