[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)
https://github.com/jcmoyer created https://github.com/llvm/llvm-project/pull/71385 Improves the accuracy of `readability-identifier-naming` for cases `Camel_Snake_Case` and `camel_Snake_Back`. Prior to this commit, these cases matched identifiers with **only** a leading upper case letter or leading lower case letter respectively. Now, uppercase letters can only appear at the start of an identifier or directly following an underscore. --- Currently, the regex for `Camel_Snake_Case` matches any identifier that starts with a capital letter: ``` ^[A-Z]([a-z0-9]*(_[A-Z])?)* ^-- underscore + capital letter after the first capital is optional ``` This means that `Camel_Snake_Case` matches other cases - in particular `CamelCase` and `Leading_upper_snake_case` - which causes clang-tidy to sometimes not flag incorrect casing. It also matches `UPPER_CASE`, but I think it's reasonable to consider this a subset of `Camel_Snake_Case` since some users may prefer e.g. `XML_Parser` to `Xml_Parser`. It's really easy to accidentally type an identifier that clang-tidy doesn't catch; all you have to do is omit an underscore or forget to capitalize a letter. The same problem also applies to `camel_Snake_Back` except that any identifier starting with a lower case letter matches, so I went ahead and adjusted its regex too. Fixing it also uncovered a minor error in an existing test. Here are some examples of the current behavior when using `Camel_Snake_Case`: ```cpp // accepted by clang-tidy String_Reader StringReader // bad, CamelCase String_reader // bad, Leading_upper_snake_case Xml_Parser_2 XML_Parser_2 XML_PaRser_2 // bad? mixed case in second word T Foo A_B_C A_b_c // bad, Leading_upper_snake_case // rejected by clang-tidy t foo a_b_c ``` After this patch: ```cpp // accepted by clang-tidy String_Reader Xml_Parser_2 XML_Parser_2 T Foo A_B_C // rejected by clang-tidy StringReader String_reader XML_PaRser_2 t foo A_b_c a_b_c ``` >From e5f12dfd2ea81f6a2c5a2978733f88da4da8420a Mon Sep 17 00:00:00 2001 From: "J.C. Moyer" Date: Sun, 5 Nov 2023 17:21:32 -0500 Subject: [PATCH] [clang-tidy] Improve alternate snake case warnings Improves the accuracy of `readability-identifier-naming` for cases `Camel_Snake_Case` and `camel_Snake_Back`. Prior to this commit, these cases matched identifiers with only a leading upper case letter or leading lower case letter respectively. Now, uppercase letters can only appear at the start of an identifier or directly following an underscore. --- .../readability/IdentifierNamingCheck.cpp | 4 +- .../identifier-naming-case-match.cpp | 60 +++ .../readability/identifier-naming.cpp | 3 +- 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp index 7539b3899682e13..793b86cadd72501 100644 --- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp @@ -871,8 +871,8 @@ bool IdentifierNamingCheck::matchesStyle( llvm::Regex("^[a-z][a-zA-Z0-9]*$"), llvm::Regex("^[A-Z][A-Z0-9_]*$"), llvm::Regex("^[A-Z][a-zA-Z0-9]*$"), - llvm::Regex("^[A-Z]([a-z0-9]*(_[A-Z])?)*"), - llvm::Regex("^[a-z]([a-z0-9]*(_[A-Z])?)*"), + llvm::Regex("^[A-Z]+([a-z0-9]*_[A-Z0-9]+)*[a-z0-9]*$"), + llvm::Regex("^[a-z]+([a-z0-9]*_[A-Z0-9]+)*[a-z0-9]*$"), llvm::Regex("^[A-Z]([a-z0-9_]*[a-z])*$"), }; diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp new file mode 100644 index 000..f692b01923455e8 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp @@ -0,0 +1,60 @@ +// RUN: %check_clang_tidy -std=c++20 %s readability-identifier-naming %t -- \ +// RUN: -config='{CheckOptions: { \ +// RUN: readability-identifier-naming.ClassCase: Camel_Snake_Case, \ +// RUN: readability-identifier-naming.StructCase: camel_Snake_Back, \ +// RUN: }}' + +// clang-format off + +//===--===// +// Camel_Snake_Case tests +//===--===// +class XML_Parser {}; +class Xml_Parser {}; +class XML_Parser_2 {}; +// NO warnings or fixes expected as these identifiers are Camel_Snake_Case + +class XmlParser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'XmlParser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class Xml_parser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'Xm
[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)
@@ -871,8 +871,8 @@ bool IdentifierNamingCheck::matchesStyle( llvm::Regex("^[a-z][a-zA-Z0-9]*$"), llvm::Regex("^[A-Z][A-Z0-9_]*$"), llvm::Regex("^[A-Z][a-zA-Z0-9]*$"), - llvm::Regex("^[A-Z]([a-z0-9]*(_[A-Z])?)*"), - llvm::Regex("^[a-z]([a-z0-9]*(_[A-Z])?)*"), + llvm::Regex("^[A-Z]+([a-z0-9]*_[A-Z0-9]+)*[a-z0-9]*$"), + llvm::Regex("^[a-z]+([a-z0-9]*_[A-Z0-9]+)*[a-z0-9]*$"), llvm::Regex("^[A-Z]([a-z0-9_]*[a-z])*$"), jcmoyer wrote: I think it's fine, `Leading_upper_snake_case` only has the first letter capitalized and no special requirements beyond that. Though maybe the regex could be slightly simplified to something like `^[A-Z][a-z0-9_]*[a-z]$`. https://github.com/llvm/llvm-project/pull/71385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)
jcmoyer wrote: > Also update release notes, add one sentence there about this. Done. https://github.com/llvm/llvm-project/pull/71385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)
https://github.com/jcmoyer updated https://github.com/llvm/llvm-project/pull/71385 >From 41f2765e7d3a0a04ac8c47d73059b16b138bd779 Mon Sep 17 00:00:00 2001 From: "J.C. Moyer" Date: Sun, 5 Nov 2023 17:21:32 -0500 Subject: [PATCH] [clang-tidy] Improve alternate snake case warnings Improves the accuracy of `readability-identifier-naming` for cases `Camel_Snake_Case` and `camel_Snake_Back`. Prior to this commit, these cases matched identifiers with only a leading upper case letter or leading lower case letter respectively. Now, uppercase letters can only appear at the start of an identifier or directly following an underscore. --- .../readability/IdentifierNamingCheck.cpp | 4 +- clang-tools-extra/docs/ReleaseNotes.rst | 2 + .../identifier-naming-case-match.cpp | 60 +++ .../readability/identifier-naming.cpp | 3 +- 4 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp index 7539b3899682e13..793b86cadd72501 100644 --- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp @@ -871,8 +871,8 @@ bool IdentifierNamingCheck::matchesStyle( llvm::Regex("^[a-z][a-zA-Z0-9]*$"), llvm::Regex("^[A-Z][A-Z0-9_]*$"), llvm::Regex("^[A-Z][a-zA-Z0-9]*$"), - llvm::Regex("^[A-Z]([a-z0-9]*(_[A-Z])?)*"), - llvm::Regex("^[a-z]([a-z0-9]*(_[A-Z])?)*"), + llvm::Regex("^[A-Z]+([a-z0-9]*_[A-Z0-9]+)*[a-z0-9]*$"), + llvm::Regex("^[a-z]+([a-z0-9]*_[A-Z0-9]+)*[a-z0-9]*$"), llvm::Regex("^[A-Z]([a-z0-9_]*[a-z])*$"), }; diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index fe8c7175d554c7b..3edd1ca46846ad8 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -399,6 +399,8 @@ Changes in existing checks ``Leading_upper_snake_case`` naming convention. The handling of ``typedef`` has been enhanced, particularly within complex types like function pointers and cases where style checks were omitted when functions started with macros. + ``Camel_Snake_Case`` and ``camel_Snake_Case`` now detect more invalid + identifier names. - Improved :doc:`readability-implicit-bool-conversion ` check to take diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp new file mode 100644 index 000..f692b01923455e8 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp @@ -0,0 +1,60 @@ +// RUN: %check_clang_tidy -std=c++20 %s readability-identifier-naming %t -- \ +// RUN: -config='{CheckOptions: { \ +// RUN: readability-identifier-naming.ClassCase: Camel_Snake_Case, \ +// RUN: readability-identifier-naming.StructCase: camel_Snake_Back, \ +// RUN: }}' + +// clang-format off + +//===--===// +// Camel_Snake_Case tests +//===--===// +class XML_Parser {}; +class Xml_Parser {}; +class XML_Parser_2 {}; +// NO warnings or fixes expected as these identifiers are Camel_Snake_Case + +class XmlParser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'XmlParser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class Xml_parser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'Xml_parser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class xml_parser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'xml_parser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class xml_Parser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'xml_Parser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class xml_Parser_2 {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'xml_Parser_2' +// CHECK-FIXES: {{^}}class Xml_Parser_2 {};{{$}} + +class t {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 't' +// CHECK-FIXES: {{^}}class T {};{{$}} + +//===--===// +// camel_Snake_Back tests +//===--===// +struct json_Parser {}; +struct json_Parser_2 {}; +struct u {}; +// NO warnings or fixes expected as these identifiers are camel_Snake_Back + +struct JsonParser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for struct 'JsonParser' +// CHECK-FIXES: {{^}}struct json_Parser {};{{$}} +
[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)
https://github.com/jcmoyer updated https://github.com/llvm/llvm-project/pull/71385 >From f8282b227e296a4662812c933999f0bf90982748 Mon Sep 17 00:00:00 2001 From: "J.C. Moyer" Date: Sun, 5 Nov 2023 17:21:32 -0500 Subject: [PATCH] [clang-tidy] Improve alternate snake case warnings Improves the accuracy of `readability-identifier-naming` for cases `Camel_Snake_Case` and `camel_Snake_Back`. Prior to this commit, these cases matched identifiers with only a leading upper case letter or leading lower case letter respectively. Now, uppercase letters can only appear at the start of an identifier or directly following an underscore. --- .../readability/IdentifierNamingCheck.cpp | 4 +- clang-tools-extra/docs/ReleaseNotes.rst | 3 +- .../identifier-naming-case-match.cpp | 60 +++ .../readability/identifier-naming.cpp | 3 +- 4 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp index 066057fa7208d55..18c5e144e46fe77 100644 --- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp @@ -872,8 +872,8 @@ bool IdentifierNamingCheck::matchesStyle( llvm::Regex("^[a-z][a-zA-Z0-9]*$"), llvm::Regex("^[A-Z][A-Z0-9_]*$"), llvm::Regex("^[A-Z][a-zA-Z0-9]*$"), - llvm::Regex("^[A-Z]([a-z0-9]*(_[A-Z])?)*"), - llvm::Regex("^[a-z]([a-z0-9]*(_[A-Z])?)*"), + llvm::Regex("^[A-Z]+([a-z0-9]*_[A-Z0-9]+)*[a-z0-9]*$"), + llvm::Regex("^[a-z]+([a-z0-9]*_[A-Z0-9]+)*[a-z0-9]*$"), llvm::Regex("^[A-Z]([a-z0-9_]*[a-z])*$"), }; diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index f49c412118e7d98..3e8f77f9e00566d 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -405,7 +405,8 @@ Changes in existing checks ``Leading_upper_snake_case`` naming convention. The handling of ``typedef`` has been enhanced, particularly within complex types like function pointers and cases where style checks were omitted when functions started with macros. - Added support for C++20 ``concept`` declarations. + Added support for C++20 ``concept`` declarations. ``Camel_Snake_Case`` and + ``camel_Snake_Case`` now detect more invalid identifier names. - Improved :doc:`readability-implicit-bool-conversion ` check to take diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp new file mode 100644 index 000..f692b01923455e8 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp @@ -0,0 +1,60 @@ +// RUN: %check_clang_tidy -std=c++20 %s readability-identifier-naming %t -- \ +// RUN: -config='{CheckOptions: { \ +// RUN: readability-identifier-naming.ClassCase: Camel_Snake_Case, \ +// RUN: readability-identifier-naming.StructCase: camel_Snake_Back, \ +// RUN: }}' + +// clang-format off + +//===--===// +// Camel_Snake_Case tests +//===--===// +class XML_Parser {}; +class Xml_Parser {}; +class XML_Parser_2 {}; +// NO warnings or fixes expected as these identifiers are Camel_Snake_Case + +class XmlParser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'XmlParser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class Xml_parser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'Xml_parser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class xml_parser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'xml_parser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class xml_Parser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'xml_Parser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class xml_Parser_2 {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'xml_Parser_2' +// CHECK-FIXES: {{^}}class Xml_Parser_2 {};{{$}} + +class t {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 't' +// CHECK-FIXES: {{^}}class T {};{{$}} + +//===--===// +// camel_Snake_Back tests +//===--===// +struct json_Parser {}; +struct json_Parser_2 {}; +struct u {}; +// NO warnings or fixes expected as these identifiers are camel_Snake_Back + +struct JsonParser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:8: w
[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)
jcmoyer wrote: Rebased to resolve merge conflict. https://github.com/llvm/llvm-project/pull/71385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)
https://github.com/jcmoyer updated https://github.com/llvm/llvm-project/pull/71385 >From 09c49dca700a5c01bee96765f1eede1808540af4 Mon Sep 17 00:00:00 2001 From: "J.C. Moyer" Date: Sat, 18 Nov 2023 07:06:07 -0500 Subject: [PATCH] [clang-tidy] Improve alternate snake case warnings Improves the accuracy of `readability-identifier-naming` for cases `Camel_Snake_Case` and `camel_Snake_Back`. Prior to this commit, these cases matched identifiers with only a leading upper case letter or leading lower case letter respectively. Now, uppercase letters can only appear at the start of an identifier or directly following an underscore. --- .../readability/IdentifierNamingCheck.cpp | 4 +- clang-tools-extra/docs/ReleaseNotes.rst | 3 +- .../identifier-naming-case-match.cpp | 60 +++ .../readability/identifier-naming.cpp | 3 +- 4 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp diff --git a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp index 066057fa7208d55..18c5e144e46fe77 100644 --- a/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp @@ -872,8 +872,8 @@ bool IdentifierNamingCheck::matchesStyle( llvm::Regex("^[a-z][a-zA-Z0-9]*$"), llvm::Regex("^[A-Z][A-Z0-9_]*$"), llvm::Regex("^[A-Z][a-zA-Z0-9]*$"), - llvm::Regex("^[A-Z]([a-z0-9]*(_[A-Z])?)*"), - llvm::Regex("^[a-z]([a-z0-9]*(_[A-Z])?)*"), + llvm::Regex("^[A-Z]+([a-z0-9]*_[A-Z0-9]+)*[a-z0-9]*$"), + llvm::Regex("^[a-z]+([a-z0-9]*_[A-Z0-9]+)*[a-z0-9]*$"), llvm::Regex("^[A-Z]([a-z0-9_]*[a-z])*$"), }; diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index f49c412118e7d98..3e8f77f9e00566d 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -405,7 +405,8 @@ Changes in existing checks ``Leading_upper_snake_case`` naming convention. The handling of ``typedef`` has been enhanced, particularly within complex types like function pointers and cases where style checks were omitted when functions started with macros. - Added support for C++20 ``concept`` declarations. + Added support for C++20 ``concept`` declarations. ``Camel_Snake_Case`` and + ``camel_Snake_Case`` now detect more invalid identifier names. - Improved :doc:`readability-implicit-bool-conversion ` check to take diff --git a/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp new file mode 100644 index 000..f692b01923455e8 --- /dev/null +++ b/clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-case-match.cpp @@ -0,0 +1,60 @@ +// RUN: %check_clang_tidy -std=c++20 %s readability-identifier-naming %t -- \ +// RUN: -config='{CheckOptions: { \ +// RUN: readability-identifier-naming.ClassCase: Camel_Snake_Case, \ +// RUN: readability-identifier-naming.StructCase: camel_Snake_Back, \ +// RUN: }}' + +// clang-format off + +//===--===// +// Camel_Snake_Case tests +//===--===// +class XML_Parser {}; +class Xml_Parser {}; +class XML_Parser_2 {}; +// NO warnings or fixes expected as these identifiers are Camel_Snake_Case + +class XmlParser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'XmlParser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class Xml_parser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'Xml_parser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class xml_parser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'xml_parser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class xml_Parser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'xml_Parser' +// CHECK-FIXES: {{^}}class Xml_Parser {};{{$}} + +class xml_Parser_2 {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'xml_Parser_2' +// CHECK-FIXES: {{^}}class Xml_Parser_2 {};{{$}} + +class t {}; +// CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 't' +// CHECK-FIXES: {{^}}class T {};{{$}} + +//===--===// +// camel_Snake_Back tests +//===--===// +struct json_Parser {}; +struct json_Parser_2 {}; +struct u {}; +// NO warnings or fixes expected as these identifiers are camel_Snake_Back + +struct JsonParser {}; +// CHECK-MESSAGES: :[[@LINE-1]]:8:
[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)
jcmoyer wrote: @PiotrZSL I don't mind but I changed it just in case it's an issue. https://github.com/llvm/llvm-project/pull/71385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits