<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/145226>145226</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format format several times gives different result
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kelbon
</td>
</tr>
</table>
<pre>
```cpp
#define TAG(...) struct a { \
};
```
clang-format once gives
```cpp
#define TAG(...) \
struct a { \
\
\
};
```
clang-format second time gives
```cpp
#define TAG(...) \
struct a { \
\
\
};
```
And its endless:
third time:
```cpp
#define TAG(...) \
struct a { \
\
\ < this brake moves to right every time
};
```
```bash
clang-format --version
clang-format version 20.1.5
```
.clang-format file:
```cpp
BasedOnStyle: Google
ColumnLimit : 110
AllowShortFunctionsOnASingleLine: false
AllowShortLambdasOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
SortIncludes: false
DerivePointerAlignment: false # disables 'Google' option which forces ignoring my rules
PointerAlignment: Left
ReferenceAlignment: Left
InsertNewlineAtEOF: true
IndentPPDirectives: BeforeHash
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0VG1vozgQ_jXmyyjImALtBz6Q9rJXqbpWl_sDBg_gW2NH9kCVf3-CJN2km60indaKFON5_MzjeZMh6M4ilixbs-wpkiP1zpff0dTORrVT-5Ll_PBrdjvGKyZSha22CP9U35i4j-OYiQeAQH5sCCSwYg3ni2WPwHgFwIonlq5nihPjvOdVY6TtVq3zgyRwtkHo9IThYLzNO8seFxc_iTgZfsg4ndykJmDjrALSw-8VdXV9qbSyCjQFQKsMhsDS6iCNeu0Pgj-O_ofaG5V-Snb6CNTrALWX3xEGN2EAcuB11xPghH5_EPhVGj4-axn6z2lZrSb0QTu7UFyYjgYQPE7i7Aovr-KLC602vwzVWgZUr3ZL-wUD35zrzKz70ZlxsC960ASzIUmWnBjj3re987QZbUPa2fBqq622ncEXbReKVpqAF9gXOdRK_owkP14Cn9stScIBLd3E69zu17jtTGgbMyoM5-dP6PWEb05bQl8Z3dnZ3wcCmEhB6SBrgwGYKI4hEQW43fxieO9100PrfIMBdGed17aDYQ9-NEv_XON-wZYYr_7GFj3aBq8Zn21AT3_hu9EWK_rjdXMWpWer0NLb25P22NDSqWkFa2ydxz8PFfSpECJVpuohfZARlkmR8ey-yEUW9aVoC5XWSSJlLor7JONJcp80UiHPk7zI80iXgouM50IkfN7FtRBJnohGcazT9A7ZHcdBahMbMw2x812kQxixTO4yIfLIyBpNWCauEOe1yISYZ7Av53ureuwCu-NGBwo_mEiTwfKygk-zakIvzdJa4TCtQOl2iSiBxzAaikZvyp5otwwMsWFi02nqxzpu3MDEZnZz_FvtvPsXG2Jis6gPTGyOD5hK8V8AAAD___pt1v4">