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

    <tr>
        <th>Summary</th>
        <td>
            Clang 14 rejects certain Unicode characters in identifiers that are accepted by Clang 13 and the C++ Standard
        </td>
    </tr>

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

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

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

<pre>
    Some Unicode characters like ₊ (U+208A) and other subscripts are rejected by Clang 14. These characters are in the allowed ranges for identifiers in the `[lex.name]` section of the C++ Standard. Recent versions of GCC and older versions of Clang do not raise any errors.

For example:
```cpp
double foo(double xₖ, double xₖ₊₁) {
  return xₖ₊₁ - xₖ;
}
```
```cpp
$ clang++-14 -c unicode.cpp -std=c++20                                                                                                                                                 
unicode.cpp:1:36: error: character <U+208A> not allowed in an identifier
double foo(double xₖ, double xₖ₊₁) {
                               ^
unicode.cpp:1:39: error: character <U+2081> not allowed in an identifier
double foo(double xₖ, double xₖ₊₁) {
                                ^
unicode.cpp:2:14: error: character <U+208A> not allowed in an identifier
  return xₖ₊₁ - xₖ;
           ^
unicode.cpp:2:17: error: character <U+2081> not allowed in an identifier
  return xₖ₊₁ - xₖ;
            ^
4 errors generated.
```
```sh
$ clang++-14 --version
Ubuntu clang version 14.0.1-++20220402053234+23d08271a4b2-1~exp1~20220402053315.111
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
```
Is this a deliberate change or a regression bug from Clang 13 to 14?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNVU2TozYQ_TXypQsKJLDhwGHGnkntNbtzTgnRBiVYoiSx8fz7NF-7ns3MJFWZVK0LY5AezevX7X61bZ6rz_aC8GS0sg2C6qSTKqDz0Os_ENgDZwUdd8B48cT4PU-KO8ZLkKYBGzp04MfaK6eH4EE6BIe_IwVooH6GYy9NC2kWw5cO_YvoE1QboAgg-97-SQ84AqOHs3WgGzRBn_WEXFFsn7D8vsdrbOQFWX6iBfD0Km0N2POMORJBOuBzIHrSNTH8iooiwVcKRDg_AX85Hhf2fUPsb3cWuo0FYwOx0cRYmmdA56zzMUtOLLlbzo_EEa_yMvTIxLo2EZwPNQzLSmPHukdKyJJ46811VbTcM36Evy9uem8X6SQ2O9wvEYHkDaMz7z4B0e22WB9lh9MPPN-izXgGapJiUTNKM4gUjEuHxASDyIeGiZNaADyBn-2zJHJDmaqU0leQHndLQaeLb_0ITBy_dbd4mBtga0vqP2luOvL_q-37KeUPb2ZV_mNW6U-a1Vtp8Sm17KOK9R_-Nv-S6uGjKvAxVL9zzdbxBS0adJIGc_z-GPDd21MgWqflgniqRxPGBbTN0WnYJ3EabZOB8yRLeJILLrJpQTRJwQ-pzGoepezwgNdh-rkBijSP0zRdXvFFuhbDJOm12P-2z6JBRb024zVqzbhCOoeygQsVpJ-Ag_X6umx9Mj6Q2tic9FwWxh9H7-hca_OqCJ882YgmcwIKputZr6mY5EtAE19SbVqHfk60Hls4O3vZTE5AsDC17OOuqURTilLugg49VpsLrtboQaELksr_iulq88L7QifDbJVSKRxeuqqYXew129uNrq-6EAY_mRN_pKPVoRvrWNkL3fT91-0nGpydSNGt9n5ETxd5dhB811USVYrFucnqPE2EKsuiKPdcFMiTpE7OatfLGntfkS2THe90tVZR8DTPeBGXKk_TQpVnUasD0pDKErxI3cfTi2Pr2p2rZg4kpafNXvvgv29K0rk1iFt8OYbOuiqEIAe5m9lWM9W_AJrZc_I">