<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/66857>66857</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Regression in clang-format-17 or clang-format-18?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
prj-
</td>
</tr>
</table>
<pre>
```
$ cat 16.cxx
typedef struct _n_PetscLogHandlerHot {
PetscLogHandler handler;
PetscErrorCode (*eventBegin)(PetscLogHandler, PetscLogEvent, PetscObject, PetscObject, PetscObject, PetscObject);
PetscErrorCode (*eventEnd)(PetscLogHandler, PetscLogEvent, PetscObject, PetscObject, PetscObject, PetscObject);
PetscErrorCode (*eventSync)(PetscLogHandler, PetscLogEvent, MPI_Comm);
PetscErrorCode (*objectCreate)(PetscLogHandler, PetscObject);
PetscErrorCode (*objectDestroy)(PetscLogHandler, PetscObject);
} PetscLogHandlerHot;
$ clang-format --version
clang-format version 17.0.1
$ clang-format --style=file:clang-format.txt 16.cxx | tee 17.cxx
typedef struct _n_PetscLogHandlerHot {
PetscLogHandler handler;
PetscErrorCode (*eventBegin)(PetscLogHandler, PetscLogEvent, PetscObject, PetscObject, PetscObject, PetscObject);
PetscErrorCode (*eventEnd)(PetscLogHandler, PetscLogEvent, PetscObject, PetscObject, PetscObject, PetscObject);
PetscErrorCode (*eventSync)(PetscLogHandler, PetscLogEvent, MPI_Comm);
PetscErrorCode (*objectCreate)(PetscLogHandler, PetscObject);
PetscErrorCode (*objectDestroy)(PetscLogHandler, PetscObject);
} PetscLogHandlerHot;
$ clang-format-18 --version
Debian clang-format version 18.0.0 (++20230918111206+08d2ea372ff6-1~exp1~20230918111321.1580)
$ clang-format-18 --style=file:clang-format.txt 17.cxx | tee 18.cxx
typedef struct _n_PetscLogHandlerHot {
PetscLogHandler handler;
PetscErrorCode (*eventBegin)(PetscLogHandler, PetscLogEvent, PetscObject, PetscObject, PetscObject, PetscObject);
PetscErrorCode (*eventEnd)(PetscLogHandler, PetscLogEvent, PetscObject, PetscObject, PetscObject, PetscObject);
PetscErrorCode (*eventSync)(PetscLogHandler, PetscLogEvent, MPI_Comm);
PetscErrorCode (*objectCreate)(PetscLogHandler, PetscObject);
PetscErrorCode (*objectDestroy)(PetscLogHandler, PetscObject);
} PetscLogHandlerHot;
```
Which one is correct? Version 17 or version 18? [clang-format.txt](https://github.com/llvm/llvm-project/files/12668673/clang-format.txt)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsll1r4zoQhn_N-EbESCN_XviiSWp64BxO2YXdyyLbY8fFsYKklOSmv31x3G0bbzebsl-FXQiIeIY3TwY_kpS1bdMTZRDOIVx6autW2mQbczvzCl3tM4j4w4cvgV8ABqxUjonIL3c7Nj50-w1VVDPrzLZ07Ka_uSZny391c6X6qiNzpR2DeD52MzapstW4gjzuuDRGm4WuiAEmgBd0R72bU9P2gClgMokBXDwmXw6tjw_-L26pfO3X9Cycy756OzDv9315Ps1_1__cLPR6fUa6PmAsDClHp3_gbOAxcknWGb1_bSbEy-lLdKXdU3l4STvVN7Nam7VybDa7I2Nb3Y_1o9pDhYnY5774aoB1-45ALut2WI4ifLd7EiJeMEc0pJW73Z-px-_14wTMD_Dj5fTv8uNU5K_xYyaSqSJLKlrVs5dNSXzu85FzDjhHjpKnIhFCII8A5zypkJSMsa6jmbin3UbcP2uSKHwRJnwgPsHzTePiY-OSn2jc2xbu73n0xs-j4zvUx1VbrpjuibWWldqYIU3m7MPjScS0eWbbUINwPhUAwiVgsnJuY0FeAOaAedO61bbwS70GzLvu7vMy2xg9QueDThYwFxhFSRRLwPyLZEy9KpNVKlPlUSaiNBRJiKHwVlmQyoiKNFScq1iGkai5qEJeRagkj7Hy2mxUHTkPglgKP6hDUVBdKhkLDHgEAae1ajt_APO1abzW2i1lUZSEsdepgjp7uI4iPgcDxOGCarLD_ym2jYWAd6119inIta6j7B01huxheG0_2VgOo53sNSBzb2u67NWjPHAPszygfwoAAP__Wy2Xnw">