[clang-tools-extra] readability-identifier-naming should add universal default options (PR #171686)

Victor Chernyakin via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 15 01:08:52 PST 2025


================
@@ -0,0 +1,72 @@
+// RUN: %check_clang_tidy %s readability-identifier-naming %t -- \
+// RUN:   -config='{CheckOptions: { \
+// RUN:     readability-identifier-naming.DefaultCase: "lower_case", \
+// RUN:   }}' \
+// RUN:   -- -fno-delayed-template-parsing
+
+// DefaultCase enables every type of identifier to be checked with same case
+#define MyMacro
+// CHECK-MESSAGES: :[[@LINE-1]]:9: warning: invalid case style for default 'MyMacro' [readability-identifier-naming]
+// CHECK-FIXES: #define my_macro
+
+namespace MyNamespace {
+// CHECK-MESSAGES: :[[@LINE-1]]:11: warning: invalid case style for default 'MyNamespace' [readability-identifier-naming]
----------------
localspook wrote:

I agree that `IdentifierCase` or `SymbolCase` would be a downgrade, so I think breaking the correspondence is the right approach here.

https://github.com/llvm/llvm-project/pull/171686


More information about the cfe-commits mailing list