<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/101513>101513</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Clang] `\n\r` newlines
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          MitalAshok
      </td>
    </tr>
</table>

<pre>
    Previous discussion about this can be found here: https://github.com/llvm/llvm-project/pull/97585/files#r1674111174

Clang currently accepts `\n\r` as a single new-line. I.e., a `\` followed by the two characters `\n\r` deletes all three of those characters in the physical source to create one logical source line.

[CWG2639](https://cplusplus.github.io/CWG/issues/2639.html) seems to make it so `\r\n` -> `\n` and `\r`(not followed by `\n`) -> `\n`, but Clang also converts `\n\r`->`\n`. This seems nonconformant in C++23.

GCC does not treat `\n\r` as a single new-line. MSVC *does* seem to treat `\n\r` as a single new-line.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk0-PpDYQxT9NcSkNMsWfhgOHHiaMclgpUqLs2ZiicdZtt2wzo_72kenO_Nm9TA7AgXrler_ykyHok2XuoX6E-imTW1yd77_pKM0xrO5HNrn52v_h-UW7LeCsg9pC0M6inNwWMa46oJIWJ8bFbXbGlT1DecQ1xkuA8gg0Ao0nHddtypU7A43GvPz3ebh49w-rCDReNmOAxu5QtzXQuGjDAaj0RXOoiqIoDhWIJxDH23sw0p5Qbd6zjeaKUim-xIDQCKgHC_XgoREoA0oM2p4Mo-XXB6Mt5_h7zjnQgPJenioXZ4x75RmnK8aVMb46VKv0UkX2v_Sd2XDkgNIYjKtnRrdgXF3gjyJt91aX9Rq0kgaD27xijA6VZxkZnWU07vTx5z7hR6dQPw7fn6kpO6ifgNrPYNXFbCE9-R2xdkDj8P0ZaNQhbInhmMT5Gs8GqMPAfA5phrP8wagjBnd353eHjcAHKH97c5wo2vmtpBFArXXxE7D32nTCT_JEetoi3lYmTXConH1h_8u6kvBdl-Nf6Xbd5rXOKmcX58_SxgR2AHoEeqTyE6znYcDZcaqPGBPkr92Ib3_-PSDQMWmBjvuhidHXW9zOz-a-nLuykxn3xYGopq47tNnac6fqclG8FKJs2kUUJNRhUqKidqmqUmW6J0GVaEVRNCXVbV6oZqqbpeGKD1I2DVSCz1KbPOUmd_6U7fvtC1HURZkZObEJe5CJVEINRCnTvt-DNm2nAJUwOsTw3iLqaPb078uB-ulnr5Zfk72Qbd70_zvTbzfwPuRLT_8GAAD__8F_XWY">