[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
Sun Jun 7 09:29:30 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:

I've reverted to the original way of doing this, IMO it would be more straightforward to review.

There is also an existing test case https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/test/clang-apply-replacements/crlf.cpp that does similar things.

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


More information about the cfe-commits mailing list