================ @@ -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