<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54497>54497</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] [] in template causing indentionation issues
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mydeveloperday
</td>
</tr>
</table>
<pre>
I think a recent change to handling [] in templates is causing indentation problems
clang-format-12
```c
template <typename T> class Foo {
private:
std::unique_ptr<const T *[]> m_conn;
public:
const T *const *m_impl;
explicit Foo() {}
};
```
clang-format version 15.0.0 (https://github.com/llvm/llvm-project.git 51ba13b1aea3d6e04310b80b6bcfc641049b9890)
```c
template <typename T> class Foo {
private:
std::unique_ptr<const T *[]> m_conn;
public : const T *const * m_impl;
explicit Foo() {}
};
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNU02T2yAM_TX4ookHg_HHwYdk053pfe8ZwCSmxcY1ONP8-8r2pk13dg_dUxkGS0h6fpKQ8u2t-Qqxs8N3kDAZbYYIupPDxUD0gELr7HABIg5EHMEOEE0_OhlNABtAyzksZju0GCij9QOMk1fO9IHQI6H77dQOEXdnP_Uy7jL2aCIF3bbe9Ds-EP4Ub6MZZG_ghfAvgCAhwLP3QMrD5jxO9oq-hL-CAYTYLhrfz4P9MZvTGCcE0n4IEV6AsP2WyYLXn_B6IPzwSGeclbP6AfAhdBNR6E8WSb6JBDA_R4y1ceFIWEVYvTItj69uKPwOuWf9UZXgaqawlDMTKU0p_rXqYhzDwow9477Y2M0q1b5Hxbnr_bPD-n8zOqboACJTMuMqk0bytjA05xlVFVWF0mdd5BnNa1VXNUWq_2U3YF1bT5DC_t1uwAftWNbnW5K0DW9rXssk2uhMg0wf-7NMwztT8WYisIHbUNgQZhOSeXLNv7UR1S0WBZHndZl0TVWcy-KsRK3yjMtSVnVVqVoXpcjpmQqdOKmMCwtlwpiaL3gS9oS1Yn-lgLfimNiGUcYoZwyfQyaKVIlWM5MxVUtaiVySnJpeWpcuvFI_XZKpWSkickCjsyGGP0Z8FvYymLViC76cY-enpr-15mqcH83UyluyJtWsGf0Cl5FXMg">