[clang-tools-extra] Update identifier-length.rst (PR #93467)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 27 05:48:55 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tools-extra
@llvm/pr-subscribers-clang-tidy
Author: Mattan Elkaim (mattanelkaim)
<details>
<summary>Changes</summary>
Swapped code blocks of parameter and variable, which have been confused
---
Full diff: https://github.com/llvm/llvm-project/pull/93467.diff
1 Files Affected:
- (modified) clang-tools-extra/docs/clang-tidy/checks/readability/identifier-length.rst (+5-5)
``````````diff
diff --git a/clang-tools-extra/docs/clang-tidy/checks/readability/identifier-length.rst b/clang-tools-extra/docs/clang-tidy/checks/readability/identifier-length.rst
index 44d97f7b363bf..271970c292c8f 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/readability/identifier-length.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/readability/identifier-length.rst
@@ -28,10 +28,7 @@ The following options are described below:
.. code-block:: c++
- int doubler(int x) // warns that x is too short
- {
- return 2 * x;
- }
+ int i = 42; // warns that 'i' is too short
This check does not have any fix suggestions in the general case since
variable names have semantic value.
@@ -50,7 +47,10 @@ The following options are described below:
.. code-block:: c++
- int i = 42; // warns that 'i' is too short
+ int doubler(int x) // warns that x is too short
+ {
+ return 2 * x;
+ }
This check does not have any fix suggestions in the general case since
variable names have semantic value.
``````````
</details>
https://github.com/llvm/llvm-project/pull/93467
More information about the cfe-commits
mailing list