Closed
Description
When the BreakAfterAttributes
option in clang-format 16 is set to Always
, it introduces a newline after attributes for member functions, but not for constructors. It seems like it should break after attributes for constructors as well.
Example input in a file called Test.cpp:
class Test {
public:
[[deprecated]] Test(int);
[[deprecated("msg")]] Test(double);
[[deprecated]] void Func1();
[[deprecated("msg")]] void Func2();
};
Command:
clang-format --style="{BreakAfterAttributes: Always}" Test.cpp
Expected output:
class Test {
public:
[[deprecated]]
Test(int);
[[deprecated("msg")]]
Test(double);
[[deprecated]]
void Func1();
[[deprecated("msg")]]
void Func2();
};
Actual output:
class Test {
public:
[[deprecated]] Test(int);
[[deprecated("msg")]] Test(double);
[[deprecated]]
void Func1();
[[deprecated("msg")]]
void Func2();
};