[Mlir-commits] [llvm] [mlir] Fix/clang tidy parameter style (PR #154995)
Rohan A M
llvmlistbot at llvm.org
Fri Aug 22 10:38:46 PDT 2025
https://github.com/badwriter123 created https://github.com/llvm/llvm-project/pull/154995
Fix #154957
For the `.clang-tidy` and `mlir/.clang-tidy` explicitly set the `ParameterCase` and `ConstantParameterCase` to `camelBack`.
This avoids relying on implicit or undocumented defaults between `ParameterCase` and `ConstantParameterCase`.
By explicitly defining the cases, we are standardizing the style across all code and reducing the ambiguity.
>From 77d3767fe703787b21c23d13d6ec77d0be76a658 Mon Sep 17 00:00:00 2001
From: Rohan <rohanam2000 at gmail.com>
Date: Fri, 22 Aug 2025 22:32:16 +0530
Subject: [PATCH 1/2] Update .clang-tidy: use camelBack for parameters and
const parameters
---
.clang-tidy | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.clang-tidy b/.clang-tidy
index 06bb0f18e9d2e..0394bccc05a95 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -25,7 +25,11 @@ CheckOptions:
- key: readability-identifier-naming.MemberCase
value: CamelCase
- key: readability-identifier-naming.ParameterCase
- value: CamelCase
+ value: camelBack
+ - key: readability-identifier-naming.ConstantParameterCase
+ value: camelBack
+ - key: readability-identifier-naming.ConstantPointerParameterCase
+ value: camelBack
- key: readability-identifier-naming.UnionCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
>From d66cd239500633cd7ad4673ff0b59128e8c00a08 Mon Sep 17 00:00:00 2001
From: Rohan <rohanam2000 at gmail.com>
Date: Fri, 22 Aug 2025 22:56:03 +0530
Subject: [PATCH 2/2] Update mlir/.clang-tidy: use camelBack for parameters and
const parameters
---
mlir/.clang-tidy | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mlir/.clang-tidy b/mlir/.clang-tidy
index eb8cbbeb9723c..6a94a941e27a2 100644
--- a/mlir/.clang-tidy
+++ b/mlir/.clang-tidy
@@ -56,5 +56,7 @@ CheckOptions:
value: camelBack
- key: readability-identifier-naming.ParameterCase
value: camelBack
+ - key: readability-identifier-naming.ConstantParameterCase
+ value: camelBack
- key: readability-identifier-naming.VariableCase
- value: camelBack
+ value: camelBack
\ No newline at end of file
More information about the Mlir-commits
mailing list