Clang format formats this:
Rect(Pos pos, Dim dim)
: m_pos(pos), m_dim(dim) {}
to this:
Rect(Pos pos, Dim dim) : m_pos(pos), m_dim(dim) {}
is there an option where you can say that the initializer list of constructors should break before the : in clang format?
This is my .clang-format file
Language: Cpp
BasedOnStyle: LLVM
IndentCaseLabels: true
NamespaceIndentation: All
AlwaysBreakAfterReturnType: None
SpaceBeforeInheritanceColon: false
AlwaysBreakTemplateDeclarations: Yes
AllowShortFunctionsOnASingleLine: All
BreakConstructorInitializers: BeforeColon
ConstructorInitializerAllOnOneLineOrOnePerLine: false
Edit: The first example is an example of the formatting I want. The second example is what clang-format does to my code.