Closed
Description
Environment
The tested v18 clang-format executable was built from latest source of 15.01.2024.
Setting in .clang-format
is:
Language: Cpp
RemoveSemicolon: true
Problem
RemoveSemicolon: true
does not remove semicolon at the end of constructor/destructor:
class A {
~A(){};
void s() {};
};
When adding something (in that case int i;
) into the implementation, it seems to work and the semicolons after }
get removed:
class A {
~A() { int i; }
void s() { int i; }
};
It looks like #58251 mentions clang-format "cannot determine {} as an empty function".