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

    <tr>
        <th>Summary</th>
        <td>
            clang-format 14 WhitespaceSensitiveMacros regression
        </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) std::cout << "CHECK = " << strcmp("one:two:three", #a) << '\n';

#define TEST_IT() void test(void)

TEST_IT() {
    CHECK(one:two:three)
}

int main() {
    test();
    CHECK(one:two:three);
    return 0;
}
```

and `_clang_format`:

```yaml
---
BasedOnStyle: Google
IndentWidth: 4
AllowShortFunctionsOnASingleLine: Empty
WhitespaceSensitiveMacros: ['CHECK']
...
```

Running clang-format 13 gives the expected answer (same as above).

Running clang-format 14 adds spaces in the CHECK() macro, but only the first one:

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

#include <iostream>

#define CHECK(a) std::cout << "CHECK = " << strcmp("one:two:three", #a) << '\n';

#define TEST_IT() void test(void)

TEST_IT() {
    CHECK(one:two : three)
}

int main() {
    test();
    CHECK(one:two:three);
    return 0;
}
```

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

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztVEuPmzAQ_jVwsYKICSE5cMgm2e32tVITaY8rY0_AlbEjbJLm33cMYTdpd9teeqhUsMDz-jxjf-PCiFN-Jw-gg2QRxKsgHr7TuB88oDd-9FqaSM1VK4AEydK6RuoyqoJkfRV65SQNugGrf3YSsJMayPLdevkhoDMW0DmxTvhEkgU3rfPhOEhAaeeE8soLgx6Beb3HUNQZDRjljsZ_qwYAdQH1sUkH_AyVBelS-19y83o-2_Vm-3S_7WDn5GCkIA6sQ9nPUXcZdu0cZGdMgs9Q1yuZDRDZ6hJLakdqJvVrYOcMfGjyp2tcOjbg2kaT-KXq57WHg75MhWlBUPXEFdPl0840NXPe5Q2OnFitetVoNOonN8yCeNAbd1I-NXJnTImzznavBWj3KIWrvGnSaxdKmeOmMo27bTV30mj7oBcbZJiCj7IrkKzrvTv17o-VxE3ZMw4b0FY65PAnxhtjvV-QImez8-7giZ9rjaLoF0V_abXG1UhX9KgvmowTUiK0Ja4CAt_2wB0IwrQ9QoNsmllWA2GWsMIc_K5Hv0ecECaEJV3ulkjdQQ8n6U--9nV48hbYA0arU-exk431Ivzv1L_dqcRz6F_p1c_GSQ6YLnLrzKmKHYAUANozzdO1MS12tGeRBW5wyo0y-op7PesIZ0qRo3QV2s5bFpFtJS1aWtv3wXBH-B5AhSFC7nbQnKkfQj6eTuM0m2YpDUWeiHkyZ6GTTkH-Yye82cW4C2UD1uI1ELaNyivn9r61A3qLo8QE2yLipkZBqcPwG-0b8xVbFEVpbQsWJ2k2TmdhlTOeCT6hBd-lu5RDOhN8PN1N5zOY0EnKIFSsAGXz7u6gGo6kg_DsTFehzGlMaTwbp_jOx-OITjJBi_FsngiazNgkmMSAjFCRzyMyTRk2eZdS0ZYWjUpaZ1-MDEsrNUC3HOKz1uHVl783lV4mNOyWzrvUvwPFqigU">