[clang-tools-extra] [clang-tidy] Improve alternate snake case warnings (PR #71385)
Piotr Zegar via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 6 07:42:54 PST 2023
================
@@ -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])*$"),
----------------
PiotrZSL wrote:
Shouldn't this LeadingUpperSnakeCase also be changed ?
https://github.com/llvm/llvm-project/pull/71385
More information about the cfe-commits
mailing list