<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/55488>55488</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-format]: treat double {{}} as single {} in array initialization
        </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>
    # input

`.clang-format`:
```yaml
---
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Right
BinPackArguments: 'false'
ColumnLimit: '120'
ContinuationIndentWidth: '1'
IndentWidth: '1'
Language: Cpp
Standard: Latest
TabWidth: '1'
UseCRLF: 'false'
UseTab: ForContinuationAndIndentation

...
```

`main.cpp`:
```cpp
std::array<str_num_pair, 5> arr = {{
        {"hello"sv, 13},
        {  "bye"sv, 15},
        {  "how"sv, 33},
        {  "are"sv,  4},
        {  "you"sv,  9}
}};
```

# after formatting

```cpp
std::array<str_num_pair, 5> arr = {
        {{"hello"sv, 13}, {"bye"sv, 15}, {"how"sv, 33}, {"are"sv, 4}, {"you"sv, 9}}
};
```

# proposal

when double curly brackets `{{...}}` appear in initializer, treat them as single ones `{ ... }`, i.e. the original code snippet formatting should not change.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylVMlu2zAQ_RrpQligtcTWQQcvNVDAQIq0RY8BRdESG4oUuCRwv75DUY6VwEkPBQYSyfc4nHlDTq2acxWlGeJycDbC-whvpu8dTqggsl2clO6JhXmUXbFgZ9KLsLRYLMJgI3grNyfL9P3A5FYT-sQs7ERboejTV9kwaedMrcn5_vTdaket08x46gNvu4m05fIbuNjo1vWwc4SjdHUiwjD4B9JOCdfLI--5nfBlimeotFw6YrmS4fxfvLHdhfnK-ww7ghCOtMwDu2EIi98tkQ3RjV88EsvMFPMPUt_28tOw3cPxcDMHwGCfhw5Kz0PeyCZENs7mJUqS5F093hWwJ1wmFMK9VTt6ScNYnwEY8bWIsp2x-lG6_nEgXEfpDhVR9gUBiKJsj6LV1tt0UOnHadoxIRT8zbPnL7NotYfBnIQg47Q-syup-IDUqZdXUvaRJ6KvnlD-Aems3JVUelJgwAAs234mHjwJ4i8xCrcfqtG-E_e_VZxL-ImKKIC3tJugW4pN0Fyn_A0yF6ecJHmV55_aDFoNyhAxX3_pmESNcrVgiDotzqgOr98g72HM0l_ZcNYdRmQYGNHQesC45UTwP2yUympGLLId6xExyID24FJJdnGEwA0KTjydJyzxbKQ0b7kkAlHVMGQkhwPsrILIdMqJBkllEe3gSbMkbqqsKbOSxJZbwaqo2L7pesXeP8kQ0JTbVK8xjVl8Yc1nM96Aa07ju41BkKqzdvAdLEoPYC23nasTqnqYCPF8-S1A3N-MWphyYxy0xPRQFPl6HXdVuqS4qcu8WTc5LU55Udcso3i9WhZlsV7jWJCaCePTgOpK9oJGFzCGTGJepThNcbEslmWKMU5IscrThtGCYrxiDEc5ZtA0ROLjSJRuY12NIdWuNQAKbqy5gsQYaOFsVM37J852Sle8JS038XhyNUb-F0Xkz7o">