[PATCH] D97625: fix check-clang-tools tests that fail due to Windows CRLF line endings

Richard via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 11 14:25:01 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfc5bf040d810: fix check-clang-tools tests that fail due to Windows CRLF line endings (authored by poelmanc, committed by LegalizeAdulthood).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D97625?vs=326956&id=408055#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97625/new/

https://reviews.llvm.org/D97625

Files:
  test/.gitattributes


Index: test/.gitattributes
===================================================================
--- /dev/null
+++ test/.gitattributes
@@ -0,0 +1,19 @@
+# CRLF (Windows) line endings take two bytes instead of one, so any tests that
+# rely on or check fixed character -offset, Offset: or FileOffset: locations
+# will fail when run on input files checked out with different line endings.
+
+# Most test input files should use native line endings, to ensure that we run
+# tests against both line ending types.
+* text=auto
+
+# These test input files rely on one-byte Unix (LF) line-endings, as they use
+# fixed -offset, FileOffset:, or Offset: numbers in their tests.
+clang-apply-replacements/ClangRenameClassReplacements.cpp text eol=lf
+clang-apply-replacements/Inputs/basic/basic.h text eol=lf
+clang-apply-replacements/Inputs/format/no.cpp text eol=lf
+clang-apply-replacements/Inputs/format/yes.cpp text eol=lf
+clang-tidy/infrastructure/export-diagnostics.cpp text eol=lf
+
+# These test input files rely on two-byte Windows (CRLF) line endings.
+clang-apply-replacements/Inputs/crlf/crlf.cpp text eol=crlf
+clang-apply-replacements/Inputs/crlf/crlf.cpp.expected text eol=crlf


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97625.408055.patch
Type: text/x-patch
Size: 1184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220211/7d8b57ca/attachment.bin>


More information about the cfe-commits mailing list