Currently the "getting started" documentation recommends that Windows
users check out the repository from github with unix line endings in
order that tests don't spuriously fail. As a Windows developer, this
doesn't cause me any problems.
See <https://clang.llvm.org/get_started.html>, "Using Visual Studio":
"If you're using git on Windows, make sure your core.autocrlf setting
However, python likes to always write out text files with native line
endings by default. This does cause me problems :). In particular,
there are some scripts like clang-tools-extra/clang-tidy/add_new_check.py
that modify files. When you run these scripts, they cause the entire
contents of the file to be marked as changed because it flips all the
line endings from LF to CRLF. I worked around this in my local tree
to avoid the spurious diffs when I run add_new_check.py and I opened a
bug on it <https://github.com/llvm/llvm-project/issues/52968>.
However, it occurs to me that this is worth some wider discussion than
just comments on that particular bug as I was reviewing
<https://reviews.llvm.org/D97625> "fix check-clang-tools tests that
fail due to Windows CRLF ine endings" which is essentially another
side-effect of the same issue.
Should scripts and tests be written to assume LF line endings
everywhere since this is the guidance on the "getting started" pages?