Skip to content

[clang-format] macro with code block starting on the define #168879

@gresm

Description

@gresm

It seems to be impossible (please correct me) to make clang-format format a macro definition like this:

#define macro {                                                                \
    int body = 0;                                                              \
}

No matter what I try, it moves the opening bracket to a new line:

#define macro                                                                  \
    {                                                                          \
        int body = 0;                                                          \
    }

(One of the variations)

Probably related: #53180

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions