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

    <tr>
        <th>Summary</th>
        <td>
            clang-format --dry-run doesn't point to formatting error when multibyte characters are involved.
        </td>
    </tr>

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

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

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

<pre>
    Consider the following code:
```
hr = ieHist->AddUrl(L"https://www.mozilla.org/2", L"Mozilla HTTPS Test ðŸ¦Š",
                    0);
```
`clang-format --dry-run`'s output for this is:
```
foo.c:1:78: warning: code should be clang-formatted [-Wclang-format-violations]
hr = ieHist->AddUrl(L"https://www.mozilla.org/2", L"Mozilla HTTPS Test ðŸ¦Š",
```

When the emoji is removed, the output is:
```
foo.c:1:73: warning: code should be clang-formatted [-Wclang-format-violations]
hr = ieHist->AddUrl(L"https://www.mozilla.org/2", L"Mozilla HTTPS Test",
                                                                        ^
```
(notice the output is now 3 lines instead of 2, with a "pointer").
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzVU01v3CAQ_TX4MrLFwvrr4MMmm1UOrVSpqXLGBttEGFaA10p_fcdOqibVVq16qYowDMyYeTzetE4-N7fOBi2Vhzgq6J0xbtF2gM5JRfiB0COhB1LQ174tRw-EH0Grex1iSvjdQcov3hBWfSCMjTGew_orO2FfliWb3FdtjMicH3CHYQxht7DGfnzxwP3Dw6fP8KBCBHKipD6RQ0Gqw0vkS1K40ihhNeE3V0Gi0Rlhh7R3fhIR0lT659TPdo1gZQA3x_Mc8crr1XUAHX513965rEPnDr-ywgEW4S2ytJorURBGNxsJrYK3OaOSQPKb9PHtZnrRzoiokXaSH_8hoT_ztY2Po7KbEtTknjRyAh6ti5JrgnX_lbU_JIv_Z2T9TnB_00h-d51wVlkXdafe8wrWLcDBaKtQkzZEJSS4HjbUi44jCECYZ6dtVH4DXGeJanZFwYs93Zd1Ihsua16LJOpoVHO9DEA6FSxWQoTtLIgOXl9irX_lPRbGssphmk3U7XPE9xqFFx2mDSC8QnQXZ1AbWTJ707xnfkCkc5t1bsKFMZfvU3r27kl1yPRJhzCrgEZeVjxPxqaied73rKV9X7Z7Vra8Z4oXgu-EYDWViRGtMqFBmeC9rVpgO2LlID8mumGUMVozitNuV2VdVbCS8r6sunpHRU32VE1Cm2zFscoh8c0GqZ2HgE6Dego_nCIEPViltnR4vpjj6HwzIJtSz1Oy5W427N8AmoaNXg">