Skip to content

[clang-format] How to remove blank line after open curly bracket ({)? #142631

Closed
@parmi93

Description

@parmi93

How can I remove the blank lines in the following example?

char *strings[] = {

    "Hello", "World"};  // Remove the blank line above

typedef struct {

    int a; // Remove the blank line above
} my_struct_t;

void foo()
{

     // Remove the blank line above
    while (true)
    {

        // Remove the blank line above
    }
}

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