clang-apply-replacements doesn't handle windows newlines correctly

Alexander Kornienko alexfh at
Wed Dec 3 06:29:52 PST 2014

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.

On Wed, Dec 3, 2014 at 4:13 AM, Nikola Smiljanic <popizdeh at> wrote:

> 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.
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the cfe-commits mailing list