Skip to content

[clang-format] Feature Request: Add ability to break\insert new line after attribute if it contains a message #158031

@kridenberg

Description

@kridenberg

Some attributes can contain an optional message, for example:
[[nodiscard(xxx)]] or [[deprecated(xxx)]]. In that case, it will be very handy to have the ability to insert a break after the attribute if it contains a message. Maybe a new option for BreakAfterAttributes can be added for this?
Right now it can be mitigated by hiding those attributes with common messages into some macros, but nevertheless, the feature may be useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-formatenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions