Issue |
127380
|
Summary |
[clang-format 21.0.0] const struct initializers are inconsistent
|
Labels |
clang-format
|
Assignees |
|
Reporter |
andr2000
|
Tested on/with:
1. clang-format 21.0.0git (https://github.com/llvm/llvm-project.git 82605285b8c6)
2. .clang-format used: https://github.com/andr2000/xen/blob/clang_cmnty_drivers_v001/xen/.clang-format
3. File in question: https://github.com/andr2000/xen/blob/clang_cmnty_drivers_v001/xen/drivers/char/ns16550.c
What I see:
```
[snip]
static const struct ns16550_config __initconst uart_config[] = {
[snip]
/* OXPCIe200 1 Native UART */
{
.vendor_id = PCI_VENDOR_ID_OXSEMI,
.dev_id = 0xc4cf,
.param = param_oxford,
},
/* Pericom PI7C9X7951 Uno UART */
{ .vendor_id = PCI_VENDOR_ID_PERICOM,
.dev_id = 0x7951,
.param = param_pericom_1port },
[snip]
```
What is expected:
```
/* OXPCIe200 1 Native UART */
{
.vendor_id = PCI_VENDOR_ID_OXSEMI,
.dev_id = 0xc4cf,
.param = param_oxford,
},
/* Pericom PI7C9X7951 Uno UART */
{
.vendor_id = PCI_VENDOR_ID_PERICOM,
.dev_id = 0x7951,
.param = param_pericom_1port
},
```
It is expected that the array of structures is formatted in the same way,
but instead it has two different formats inside the same definition.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs