<div dir="ltr">Done in r223750, I'll keep an eye on bots.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 9, 2014 at 11:37 AM, Nikola Smiljanic <span dir="ltr"><<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yep, fails then passes. I guess you're right, I'll just diff the source file without copying it.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 9, 2014 at 11:29 AM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I assume, the test breaks before your patch and passes with it? I'd give it a try then.<div><br><div>One nit:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><span style="color:rgb(0,0,0);font-family:'Courier New',Courier,monospace;font-size:14px;white-space:pre-wrap">+// RUN: cp %S/Inputs/crlf/crlf.cpp.expected %T/Inputs/crlf/crlf.cpp.expected</span></div></blockquote><div><div class="gmail_extra"><br></div><div class="gmail_extra">you don't seem to change the .expected file. Why copy it to a temporary directory?</div><div class="gmail_extra"><br></div><div class="gmail_extra">Otherwise looks good.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 8, 2014 at 12:54 PM, Nikola Smiljanic <span dir="ltr"><<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">We already have tests that rely on CRLF line endings in Sema/warn-documentation-crlf.c and FixIt/fixit-newline-style.c. They should be fine once they're in the repo, I'm just concerned that commit process and syncing with svn might mess it up. If the changes look good I could give it a try?</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 8, 2014 at 10:05 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I don't think we can rely on both git and svn deal correctly with line-endings on all platforms =\ Can we generate a test file with needed line endings during a test run?<span><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 4, 2014 at 6:09 AM, Nikola Smiljanic <span dir="ltr"><<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">This patch should have mixed newlines, I just hope Git doesn't convert them on commit.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 4, 2014 at 1:43 PM, Nikola Smiljanic <span dir="ltr"><<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I think it'll only happen when you run it on Windows. Writing files in text mode will translate each \n into CRLF on this silly platform :) I'm honestly surprised that nobody noticed this before. I filed a bug for clang-modernize for thisĀ <a href="https://cpp11-migrate.atlassian.net/browse/CM-171" target="_blank">https://cpp11-migrate.atlassian.net/browse/CM-171</a></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 4, 2014 at 1:29 AM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">That may be a good solution, however, could you provide a bit more details: does this problem happen when you run clang-apply-replacements on Windows or on Linux or Mac as well? It would also be nice if we could have a test for this.<div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Dec 3, 2014 at 4:13 AM, Nikola Smiljanic <span dir="ltr"><<a href="mailto:popizdeh@gmail.com" target="_blank">popizdeh@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><div dir="ltr">I'm not entirely sure this is the right way to fix the issue, but since SourceManager reads \r \n we should probably write them without newline translation. What happens now is, newline is read as \r \n and when it's written out the \n is translated so we end up with duplicated \r.<div><br></div></div></span></blockquote></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote></div>
</div></div></span></div>
</blockquote></div></div></div></div></blockquote></div><div><br></div>
</div></div></div></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>