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

    <tr>
        <th>Summary</th>
        <td>
            clang-format adds space in macro call that causes answer difference
        </td>
    </tr>

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

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

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

<pre>
    Given:

```c++
#include <string.h>
#include <iostream>

#define CHECK(a) strcmp("one:two:three", #a)

int main() {
    std::cout << "CHECK = " << CHECK(one:two:three) << '\n';
    return 0;
}

```

and `_clang_format`:

```yaml
---
BasedOnStyle: Google
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
...

```
Running clang-format 13 or 14 gives:

```c++
#include <string.h>

#include <iostream>

#define CHECK(a) strcmp("one:two:three", #a)

int main() {
    std::cout << "CHECK = " << CHECK(one:two : three) << '\n';
    return 0;
}

```

Notice that spaces have been added around the second colon in the CHECK macro call. This causes the
answers to differ.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzdUk1v3CAQ_TX4gtay8df64EOym6RtqlZqIvUYYRjbtBhWgBPtv-_Y3u2mUtpTe6mFDPNmmPeA11p5bO7UMxiSXZFkT5Lzv0zWIQi7nseKskwZoScJlGQ7H5wyfTyQ7OattLJYAHy8pM9FEjplgO7e3ezuCdtywmqKtWI8YEQYswZQTnix839wAIgRtqO4da593U2ZQEeuzLKxpqQ6KaX4-SDnU2VXwk5hVoQDe7CFF-P9HJzxs5g3uOvL3ooUOzNP2SseB2FyhiY_QVLt37zL1yA3kiL0JDQ3_VNn3cjDXPKbZzjyUa_QZrNZF9fcg_xsHsJRz5LpnbU9rpbceyPBhK9KhmFO5St6D3C4GQ_h-BGv31-FxwEeAnfhc3etrfju59LgplOPOI7_cIovkzH4-nTRv1n10zSj1tE0pz1ayv8VS_1_xqLLNf9Da32yQQlACnwRf-ACPB34M9AWwFAuJUjKnZ3QgGEA6kFYXAqrraHKLNh6kJELZ6ngWsf0cVAel5PHZlhx9rB_AYeApVJ1HbiTYSJo0rJMiorleR3JJpN1VvMoqKCh-cUwqMavGmfqC-Eq_sS30pwowAiIJqebIYTDYjF2i6NXYZjaWNgRA62fz9Pm4Ow3EAFD5f2EpmS3RZUWZTQ0hZCZ4ElXZFvJCtHl26Lt6hyKMuHlVqaR5i1o35AC7coMvNClxeyZYh-phiWMJdu0SPOkYlUMaZayuky7lrE2SyuSJ4AO0vGsI7auj1yzSGqn3mNSKx_8Jcm9V70BWOiwP5_CYF3zwQ5ml7FooW4W6T8AgcCccA">