<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57391>57391</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format removes spaces between throw and cast
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
alanzhao1
</td>
</tr>
</table>
<pre>
First reported in Chromium: https://crbug.com/1018187
Repro steps:
```
$ cat test_throw.cpp
void foo(int x) { throw (long) x; }
$clang-format test_throw.cpp
```
Expected behavior:
`clang-format` should not remove the space before `throw` and `(long)`
Actual behavior:
```
void foo(int x) { throw(long) x; }
```
It seems that `clang-format` is treating `throw (long)` as a function-style construct instead of a cast.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9U8GOmzAQ_RpzsYKwISQcOCRNV-q1P1AZM4ArYyN7yGb79R1I2iSr3ZUsM-OZ8XvzPDS-fatfTIjIA0w-ILTcOP5tCH4088jyAx8Qp0gGky-0dGjmPtV-JFtkYi_2O5adWHa47j9hCp5HhGvJQ4SV2W1dXVlwrZAjRPyFBPea6mm6xs7etLzznsm9ccgvTFac7Y58TeN0ar3rl8MLy48UOT3hyEJb5fpN58P4CcB7Luv-_TKBXvpvYFBn48O9gTJ7vJJcHgc_25Y7v-g2-jMQOeBxUhqonvKAU9oKu6Qr1y7-nfo77IPGWdkPkR-JfinM57p81O0P5BFgjFRLIn3QoaFQAIXG9f9b4U8NcBW54t3sNBrvNhHfLHDtXcQwa6QxojFQLfcdZWkVMU2gFmUptoUoijxp67yt8kolaNBC_fRoV03jVdBIuuArgLsNwCLmcl8yB1s_T2dvcJib23hae_732dBU_qbXJdfEOEMkY7vLK5EMdQuyrTohRZcTr12jq0qWXQeV3ndiJ4vEqgZsrNn2yKR8kklKtj0lppaZlNlelqKigjwtt5XMcyWKpssr2ZSsyGBUxqYLldSHPgn1yop-pUhBayLGe1DFaHoHsCLS_WrGwYdaEfKfQXmRrC3UK_-_p8Elgg">