[PATCH] D39737: [MC] Fix regression tests on Windows when git “core.autocrlf” is set to true

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 10:07:05 PST 2017


rnk added a comment.

Please add a regression test that tests your code change when the repo is checked out with normal line feeds. That way we can catch regressions for this on Linux.



================
Comment at: lib/MC/MCParser/AsmLexer.cpp:213
     CurChar = getNextChar();
+  if (CurChar == '\r')
+      CurPtr++;
----------------
This assumes the next character is '\n', which was not the case on Mac OS 9. Please check this assumption.


================
Comment at: lib/MC/MCParser/AsmLexer.cpp:616
+    if (CurChar == '\r')
+        CurPtr++;
     return AsmToken(AsmToken::EndOfStatement, StringRef(TokStart, 1));
----------------
Indentation should use two spaces, not four, here and above.


https://reviews.llvm.org/D39737





More information about the llvm-commits mailing list