https://github.com/AaronBallman updated 
https://github.com/llvm/llvm-project/pull/182075

>From 5d7e09d8a689e12fdce1ac6b24c10fa3accf7a45 Mon Sep 17 00:00:00 2001
From: Aaron Ballman <[email protected]>
Date: Wed, 18 Feb 2026 12:40:07 -0500
Subject: [PATCH 1/2] Do not format .td files in Clang; NFC

We have varying needs for these files. e.g., a diagnostic file is a
different kind of file than compiler options which is different than
attributes which is different than attribute documentation, etc. So
running clang-format over .td files in Clang is not going well in
practice because of how often it reformats things unlike the rest of
the file. This results in a poor new contributor experience because
pre-commit CI tells them the changes are not clang-format clean but we
don't want the changes to be clang-format clean and so a reviewer asks
them to revert and ignore pre-commit CI.
---
 clang/.clang-format-ignore | 3 +++
 1 file changed, 3 insertions(+)
 create mode 100644 clang/.clang-format-ignore

diff --git a/clang/.clang-format-ignore b/clang/.clang-format-ignore
new file mode 100644
index 0000000000000..107c098a1670f
--- /dev/null
+++ b/clang/.clang-format-ignore
@@ -0,0 +1,3 @@
+# Do not attempt to format .td files; we have too many formatting needs across
+# the various files to allow automatic formatting.
+*.td

>From 60f7571e255eae4885565cfb49108dd73cc11294 Mon Sep 17 00:00:00 2001
From: Aaron Ballman <[email protected]>
Date: Fri, 20 Feb 2026 07:46:58 -0500
Subject: [PATCH 2/2] Fix glob pattern

Co-authored-by: Sirraide <[email protected]>
---
 clang/.clang-format-ignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/.clang-format-ignore b/clang/.clang-format-ignore
index 107c098a1670f..1fb0c9558af83 100644
--- a/clang/.clang-format-ignore
+++ b/clang/.clang-format-ignore
@@ -1,3 +1,3 @@
 # Do not attempt to format .td files; we have too many formatting needs across
 # the various files to allow automatic formatting.
-*.td
+**/*.td

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to