Skip to content

Commit 13b5049

Browse files
committed
rephrase
on-behalf-of: @amd <[email protected]>
1 parent a4348de commit 13b5049

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang-tools-extra/docs/clang-tidy/checks/readability/avoid-default-lambda-capture.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
readability-avoid-default-lambda-capture
44
========================================
55

6-
Warns on default lambda captures (e.g. ``[&](){ ... }``, ``[=](){ ... }``)
6+
Warns on default lambda captures (e.g. ``[&](){ ... }``, ``[=](){ ... }``).
77

88
Captures can lead to subtle bugs including dangling references and unnecessary
99
copies. Writing out the name of the variables being captured reminds programmers
@@ -33,8 +33,8 @@ Example
3333
}
3434

3535
When ``callbacks`` is executed, ``factoryId`` will dangle. Writing the name of
36-
``factoryId`` in the capture list makes it easy to review the captures and
37-
detect obvious bugs.
36+
``factoryId`` in the capture list reminds the reader that it is being captured,
37+
which will hopefully lead to the bug being fixed during code review.
3838

3939
.. code-block:: c++
4040

0 commit comments

Comments
 (0)