[llvm] [CodingStandard] Require Unix line endings for C/C++ source and headers (PR #161228)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 30 00:56:33 PDT 2025


================
@@ -1790,6 +1790,13 @@ would help to avoid running into a "dangling else" situation.
       markAsIgnored(D);
   }
 
+Use Unix style line endings for source files
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Use Unix style line endings for C/C++ source files (``.c``, ``.cpp`` and header
+files). This is required to avoid various build issue for downstream clients of
+LLVM. Test files like C/C++/HLSL test inputs can continue to use any line ending
+style.
----------------
nikic wrote:

I don't think this is true? Test files are only allowed to use CRLF line endings if those are required for the specific intent of the test (testing handling of CRLF, or the file format requires it).

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


More information about the llvm-commits mailing list