[Mlir-commits] [mlir] [mlir] Set WrapNamespaceBodyWithEmptyLines: Never (PR #221421)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Sep 5 01:05:00 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Fangrui Song (MaskRay)
<details>
<summary>Changes</summary>
MLIR predominantly writes namespace bodies without a wrapping empty line: in
mlir/lib and mlir/include 35% of bodies start with an empty line and 32% end
with one.
```
namespace ns { // no empty line below
struct A {
};
} // namespace ns // no empty live above
```
New code drifts the other way, partly related to LLM preference. Pin the
majority style using a clang-format 20 feature to stop further damage.
---
Full diff: https://github.com/llvm/llvm-project/pull/221421.diff
1 Files Affected:
- (modified) mlir/.clang-format (+1)
``````````diff
diff --git a/mlir/.clang-format b/mlir/.clang-format
index 76cc928e64588..cbf894d360915 100644
--- a/mlir/.clang-format
+++ b/mlir/.clang-format
@@ -1,3 +1,4 @@
BasedOnStyle: LLVM
AlwaysBreakTemplateDeclarations: Yes
LineEnding: LF
+WrapNamespaceBodyWithEmptyLines: Never
``````````
</details>
https://github.com/llvm/llvm-project/pull/221421
More information about the Mlir-commits
mailing list