Skip to content

Commit 0aacef3

Browse files
authored
[clang-tidy][NFC] Update identifier-length.rst (#93467)
Swapped code blocks of parameter and variable, which have been confused (in a clang-tidy doc file)
1 parent c96860a commit 0aacef3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang-tools-extra/docs/clang-tidy/checks/readability/identifier-length.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ The following options are described below:
2828

2929
.. code-block:: c++
3030

31-
int doubler(int x) // warns that x is too short
32-
{
33-
return 2 * x;
34-
}
31+
int i = 42; // warns that 'i' is too short
3532

3633
This check does not have any fix suggestions in the general case since
3734
variable names have semantic value.
@@ -50,7 +47,10 @@ The following options are described below:
5047

5148
.. code-block:: c++
5249

53-
int i = 42; // warns that 'i' is too short
50+
int doubler(int x) // warns that x is too short
51+
{
52+
return 2 * x;
53+
}
5454

5555
This check does not have any fix suggestions in the general case since
5656
variable names have semantic value.

0 commit comments

Comments
 (0)