Skip to content

[clang-format] , In the C language, how to make the left curly brace start on a new line when defining and initializing an array variable? #121268

@TwoBrushes

Description

@TwoBrushes
/** USB standard device descriptor. */
uint8_t USBD_FS_DeviceDesc123[] = {
    0x12,       /*bLength */
    0x34,       /*bDescriptorType*/
    0x19, 0x78, /*bcdUSB */
    0x00,       /*bDeviceClass*/
    0x00,       /*bDeviceSubClass*/
    0x00,       /*bDeviceProtocol*/
    0x12,       /*bMaxPacketSize*/
    0x12,       /*idVendor*/
    0x12,       /*idVendor*/
    0x12, 0x12, /*idProduct*/
    0x12, 0x12, /*bcdDevice rel. 2.00*/
    0x12,       /*Index of manufacturer  string*/
    0x12,       /*Index of product string*/
    0x12,       /*Index of serial number string*/
    0x12        /*bNumConfigurations*/
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-formatquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions