rsmith added a comment.

In D108742#2970283 <https://reviews.llvm.org/D108742#2970283>, @cor3ntin wrote:

>> Drive-by observation: under P2348 <https://reviews.llvm.org/P2348>, Clang's 
>> behavior of treating `\n\r` as a single new-line would be "non-standard" 
>> (requiring special phase 1 mapping). Is that intentional? `\n\r` is used as 
>> a new-line character on old Mac systems.
>
> Somewhat. `\n\r` is not described by Unicode so we could either mandate that 
> all implementation support that or leave it as implementation-defined 
> mapping. Correct me if I am wrong, but as the line number is itself 
> implementation-defined, whether there are one or 2 line breaks would not 
> materially affect the standard, either way.

Yes, I suppose that's true. Though if we're nailing down exactly how new-lines 
are defined and asking every conforming implementation to support UTF-8 and 
such, maybe it's time to also define how the presumed line number is 
determined? =)

> But also, when I looked at it, I was under the impression that older macs 
> used a single `\r`.

Oops, you're right, I was thinking of Acorn systems not Macs :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108742

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to