clang-format: Break after return type with __attribute__

Viewed 49

I have the following option set in my .clang-format:

AlwaysBreakAfterReturnType: All

However, if I have a function of the form

int __attribute__((deprecated))
someFunc(void);

it gets reformatted to

int __attribute__((deprecated)) someFunc(void);

Is there a way to get clang-format to get AlwaysBreakAfterReturnType to work with __attribute__?

This is version 14.0.0.

1 Answers

It appears as though

int
someFunc(void) __attribute__((deprecated));

is equally valid and works just fine with clang-format.

Related