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

    <tr>
        <th>Summary</th>
        <td>
            `_Static_assert` after case label is not recognized
        </td>
    </tr>

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

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

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

<pre>
    Copied from https://github.com/mstorsjo/llvm-mingw/issues/285, online https://godbolt.org/z/nsPEh54h6

See build errors at https://github.com/zufuliu/notepad2/runs/6699313318?check_suite_focus=true
reproduce:
```c
#if !defined(__cplusplus)
#define static_assert(expr)             _Static_assert(expr, #expr)
#endif

int test(int id) {
        static_assert(1 == 1);
        switch (id) {
        case 1:
                static_assert(1 == 1);
                return 1;
        default:
                return 0;
        }
}
```

```
D:\notepad2\notepad2\src>x86_64-w64-mingw32-clang++ -c -xc++ -std=c++17 test.c

D:\notepad2\notepad2\src>x86_64-w64-mingw32-clang -c -std=c17 test.c
test.c:9:3: error: expected expression
                static_assert(1 == 1);
                ^
test.c:2:30: note: expanded from macro 'static_assert'
#define static_assert(expr)             _Static_assert(expr, #expr)
                                        ^
1 error generated.
```

This may be an upsteam llvm issue for mingw target, with official 14.0.4 binary:
```
D:\notepad2\notepad2\src>clang++ --target=x86_64-pc-windows-msvc -c -xc++ -std=c++17 test.c

D:\notepad2\notepad2\src>clang++ --target=x86_64-pc-windows-gnu -c -xc++ -std=c++17 test.c

D:\notepad2\notepad2\src>clang --target=x86_64-pc-windows-msvc -c -std=c17 test.c

D:\notepad2\notepad2\src>clang --target=x86_64-pc-windows-gnu -c -std=c17 test.c
test.c:9:3: error: expected expression
                static_assert(1 == 1);
                ^
test.c:2:30: note: expanded from macro 'static_assert'
#define static_assert(expr)             _Static_assert(expr, #expr)
                                        ^
1 error generated.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztVk1v2zAM_TXORUhgy7ETH3xIm-48YLsHskTb2mzJ0MfS9tePcpwsdbsiwFZghxlSQEkU3yNFKqq0eCrv9SBBkNronrTODTZKdxH9hK2RrvXViuseB7112thvGsWu-9Eve6maIw6ktR4sCnSbRfSeaNVJBXNLWlS6cyttGhw9Y1f280Obrds8ivdRvDv9fgEglZedIGAMohHm3qP07GvfSR-saQcDExRF41Vgk-dFkSZpmmyj9BNvgX8_WC8dHGrNPdrbO-PhhGpgMFp4DgHlxCaPT41PY5rKmkQ0EVCjcyKi28OBD523oUe0uKidFIh1zEl-YNaCcagNj4MZ1UI7fHlz9R4B0oviZA-UkPV1iKRyxIEN24IokUtBos3dWaeYQycEncVGkmA3vVI8SsdbEgy9MsKZBdxwicfI-2bL2Aw4b1Qw8WsaY8N852ZWJ834hYHNfpIvwvlErmMxm9wHy9n9JRdeiNbwKH143OaHfL08Yh_zN6VL3jGFSXmHjSw5WT7y88A6gd5Nw2Qzhn3Frwn8AeKINSHMbE9yusOg7lLsp2oYhccBuMNqDXkC1kqtTnvI7LvtrOa7ouxhRoEGCnGADp5NFJgS5wujZ9xozKHNDHBzY0W8gL-5MOa8f_dd_ElOISQNKDAMA7h6J62-ttKiY0-kAsIU8YN1wHoSbj0y3nakRlPjaRLHTAMucMRqaomua8kl60iyXsWrNamkYubp9b1yc_q8yM7lhJbup6wa-PIoldBHu-ztD_4R-XszgUb5D8O_0fW3y-lvQp2d_F-4_0rhLkSZiiIt2MJJ10GJUzM2eUxY7cCQ8U-tYxV0WMYhLMQA142SzyAW3nTlO0-NUPznlw--Fr7hYV6_fbJsS5NFW0JcQ0F5wvIMMi5oLmiW14zzukgwomwxwtsyyu6ibL-QJY0pjfMYF7OM0lWdp2KT5NuK8o0QDKJ1DD2T3SoAh9fTwpQjh8o3Fhc7aZ39tYgey0YBnO0z71ptyumdtBjpliPXn_oX5mc">