[PATCH] D158787: [clang-tidy][readability] add Leading_upper_snake_case issue 42451

Steven Lewis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 25 08:31:54 PDT 2023


MasterCopy8GB updated this revision to Diff 553494.
MasterCopy8GB added a comment.

Update documentation for issue 42451


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158787/new/

https://reviews.llvm.org/D158787

Files:
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/readability/identifier-naming.rst


Index: clang-tools-extra/docs/clang-tidy/checks/readability/identifier-naming.rst
===================================================================
--- clang-tools-extra/docs/clang-tidy/checks/readability/identifier-naming.rst
+++ clang-tools-extra/docs/clang-tidy/checks/readability/identifier-naming.rst
@@ -31,6 +31,10 @@
 but not where they are overridden, as it can't be fixed locally there.
 This also applies for pseudo-override patterns like CRTP.
 
+Leading_upper_snake_case is a naming convention where the first word is capitalized
+followed by lower case word(s) seperated by underscore(s) '_'. Examples include:
+Cap_snake_case, Cobra_case, Foo_bar_baz, and Master_copy_8gb.
+
 Options
 -------
 
@@ -2100,7 +2104,7 @@
 
 For example using values of:
 
-   - StructCase of ``Leading_upper_snake_case``
+   - StructCase of ``lower_case``
    - StructPrefix of ``pre_``
    - StructSuffix of ``_post``
 
@@ -2119,9 +2123,9 @@
 
 .. code-block:: c++
 
-    struct pre_Foo_post {
-      pre_Foo_post();
-      ~pre_Foo_post();
+    struct pre_foo_post {
+      pre_foo_post();
+      ~pre_foo_post();
     };
 
 .. option:: TemplateParameterCase
Index: clang-tools-extra/docs/ReleaseNotes.rst
===================================================================
--- clang-tools-extra/docs/ReleaseNotes.rst
+++ clang-tools-extra/docs/ReleaseNotes.rst
@@ -113,10 +113,6 @@
 
 - Improved `--dump-config` to print check options in alphabetical order.
 
-- Improved :doc:`readability-identifier-naming
-  <clang-tidy/checks/readability/IdentifierNamingCheck>` check to allow for
-  Leading_upper_snake_case naming convention.
-
 New checks
 ^^^^^^^^^^
 
@@ -257,6 +253,10 @@
   <clang-tidy/checks/readability/static-accessed-through-instance>` check to
   identify calls to static member functions with out-of-class inline definitions.
 
+- Improved :doc:`readability-identifier-naming
+  <clang-tidy/checks/readability/IdentifierNamingCheck>` Leading_upper_snake_case ->
+  Leading_upper_snake_case. allow for -> support
+
 Removed checks
 ^^^^^^^^^^^^^^
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158787.553494.patch
Type: text/x-patch
Size: 2063 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230825/9b3e068c/attachment.bin>


More information about the cfe-commits mailing list