[clang-tools-extra] 0aacef3 - [clang-tidy][NFC] Update identifier-length.rst (#93467)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 13:19:06 PDT 2024


Author: Mattan Elkaim
Date: 2024-05-28T22:19:01+02:00
New Revision: 0aacef3abc41cfc8efb5f1b9483bc37599352a59

URL: https://github.com/llvm/llvm-project/commit/0aacef3abc41cfc8efb5f1b9483bc37599352a59
DIFF: https://github.com/llvm/llvm-project/commit/0aacef3abc41cfc8efb5f1b9483bc37599352a59.diff

LOG: [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)

Added: 
    

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

Removed: 
    


################################################################################
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.


        


More information about the cfe-commits mailing list