<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/55476>55476</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format]: function argument default value continuation indent is missing
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
igagis
</td>
</tr>
</table>
<pre>
# to reproduce
`.clang-format`:
```yaml
---
AlignAfterOpenBracket: BlockIndent
ColumnLimit: '120'
ContinuationIndentWidth: '1'
Standard: Latest
TabWidth: '1'
UseCRLF: 'false'
UseTab: ForContinuationAndIndentation
...
```
`main.cpp`:
```cpp
void func(
type arg
= default_value
);
void func(
type loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_arg
= default_value
);
void func(
type arg
#if MACRO
= default_value
#endif
);
void func(
type arg //
= default_value
);
void func(
type arg = //
default_value
);
```
run
```console
clang-format main.cpp
```
# expected result
```cpp
void func(type arg = default_value);
void func(
type loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_arg =
default_value
);
void func(
type arg
#if MACRO
= default_value
#endif
);
void func(
type arg //
= default_value
);
void func(
type arg = //
default_value
);
```
# actual result
```cpp
void func(type arg = default_value);
void func(
type loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_arg =
default_value
);
void func(
type arg
#if MACRO
= default_value
#endif
);
void func(
type arg //
= default_value
);
void func(
type arg = //
default_value
);
```
Continuation indentation of `default_value` in latter 3 function declarations is missing.
# version
```console
$ clang-format --version
Debian clang-format version 15.0.0-++20220513071846+693758b28295-1~exp1~20220513071937.249
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztVltvmzAU_jXwYoHADgEeeEiaVZrUqVK3aY-VwYZ4NXZkm2z99zuQG6TZKnVdtYdGFtjnxrl8OT6lZo-FhwlyGhm-MZp1FfeilRct9s95FFaSqiaotWmpg7NHTrzdeqSt3JGCINhtFlI0alE7bm43XC0NrR64A020lLp6-KgYV24neaVl16ob0YqB7-E0xhE8D1zlhOqoE1rttL4J5tYHyaPcZ0cVo4b1jBvquN1b_0LLywpfLb-6u7ne02sqLR_zQK9nXWsz9mCh2M6J4TTOUxiGZ2nbrymxpUKF1WZzMY09faBstWCo7lTl4exgIHePG46oaY4Ej6wQ4zXtpLvfUtkd6oaBsxx_9_fmpH6jn2ruX9n1kzlMRI0-La7ubp-3T7hion7R1wAm1_163RhQb-bM8nNWL2HLdOocTVpZLff6478wOoLwD1CFlsB_bnjlOIPGYMGdi_C-CNlJbNNg_l9s9s6eavt8Ef4Knm-E0H8J0hfitAcWrVxH5Tus3rvey7ve-FZG4nQnI10jEJoam0cggiR1MI4gMng1yDIOfdEMehYJi1phrVBNeA7YLTf27L6_3GY9PEOTVhsEE90VLwVVU5G9AIqTMAqjwMNLWDjCOEpiEqVxNpsDYZ6TNMlKnOE8CWIv_QDduX-NBEEixLP8zD-fFYTlJKe-E07ywkuWk3kuWfVzzjElUJyuhWQeioyGDKLqabpHCfM7I4u1cxvbDzVDWRvh1l0ZVrqFg5TbwyuAGfM7XCtwBN2OW9gkySyd--uCZiRL6iwieVonWZWwpCSzNJnHLMNxGjNf0pJL24fgYaz4DzSYgD1E4YtinwvIBo5jGFsphD2PCOF1muVV7s0iDlefDHs_Qm0a3xSDS2XXWGBKYZ09MSmE1ig-ZKy3Tzu31qYQDW2E9YcvF4PnvwAj01yu">