[clang-tools-extra] [clang-tidy] Preserve line endings in macro-to-enum fixes (PR #202054)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 6 09:31:50 PDT 2026


================
@@ -0,0 +1,3 @@
+// RUN: %python -c "from pathlib import Path; Path(r'%/t.cpp').write_bytes(b'#define RED 1\r\n#define GREEN 2\r\n')"
----------------
zeyi2 wrote:

The test case here tries to mimic https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/test/clang-apply-replacements/crlf.cpp, but without introducing new input and `.expected` files for diff (they require changing .gitattributes, IMO this is unnecessarily complex).

The Windows build failure seems like unrelated problem, I'll try re-trigger the run later.

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


More information about the cfe-commits mailing list