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

Dominik Kaszewski via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 11 11:29:55 PST 2025


================
@@ -0,0 +1,67 @@
+// RUN: %check_clang_tidy %s readability-identifier-naming %t -- \
+// RUN:   -config='{CheckOptions: { \
+// RUN:     readability-identifier-naming.DefaultCase: "lower_case", \
+// RUN:   }}'
+
+// 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]
----------------
dkaszews wrote:

Okay, it was actually used as polymorphic override, it was helpful to run it under `gdb` to understand more of the code. Handling case where default case is defined but macro case is not was sufficient.

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


More information about the cfe-commits mailing list