[clang] Do not format .td files in Clang; NFC (PR #182075)

via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 18 09:47:51 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Aaron Ballman (AaronBallman)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/182075.diff


1 Files Affected:

- (added) clang/.clang-format-ignore (+3) 


``````````diff
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

``````````

</details>


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


More information about the cfe-commits mailing list