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

    <tr>
        <th>Summary</th>
        <td>
            Error while lexing identifier if it contains an escaped newline followed by a Unicode character
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Minimal test case

```
int main(void) {
    int a\
ス = 42;
    return aス;
}
```

Godbolt example of failed compilation in clang 16
https://godbolt.org/z/TsMrbKqT6

Godbolt example of successful compilation with GCC 13.2
https://godbolt.org/z/hrzqcPKnn

Based on some debugging, I think we are looking at the '\\' in tryConsumeIdentifierUTF8Char, downstream of LexIdentifierContinue.
Perhaps that function needs to take a Size argument like tryConsumeIdentifierUCN does, so that it can correctly decode the Unicode char after the escaped newline.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU9uOnDgQ_RrzUkoLzADDAw8ZJkRRNqtIO_mAAhdQaWN37CI9PV-_gm5NLoq0KyEDrsu52IUx8uSIGlU8qOIxwVVmH5oFRRZ0X7Mq6b25NJ_Y8YIWhKLAgJFU-qjSt7e1TG_P_stOYEF2St9_92yUrkFVD9cYAMAWR1W0t-J3ubrX6qEGlT_CnVb5T6mBZA0O8DXpNaqqxz-CX9f33vTeCtAzLidL4EcYkS0ZGPxyYovC3gE7GCy6CbLyWjaLnKLK3yrdKd1N1yYHHyaluxelu6f4KfQfvz2V_4EV12GgGMfV_oJ3ZpnhfdtClh_0_0Ocw8u34fNH535GfMBIBryD6BcCQ_06TewmpVv4ADKzO8KZAAOB9f7IbgIUkJlA6WrzvWiVrjb1Ei6td3Fd6IMhJzwyhS9P3X07Y9i6GX92UQLhsqn6i55_pLXeCbuVDldKnynMeIogMwqMqxt2wY7IRBAPgkcChH_4ZeM1rQs5ActH-jOF9m8wnuJGIfprT96unYPBh0CD2AsYGryhXdYXx_v3MGMAHIXCvk1xwBMZcHS27OiQmCY3dV5jQk1W1nmhq7tKJ3NDdaXL_h4LXY29LuqsqPue8tLklFWG0oQbneo8rdMsTbOq0IfUjLlOzVgVWV5VOam7lBZke7D2-7IdX8IxrtSURVaUicWebNwnTGtHZ9iDSutt4EKz1bzp1ymqu9RylPiji7BYat6F4AOcZ7YElp63A-VXs4DH3RzvBNlFQPe7cBi9tf5MBvoL4C9u4SAUkjXY5reLyDKv_WHwi9Ldxub2enMK_isNonS3a4hKd7vGfwMAAP__tp5fFQ">