Hello cfe-dev,
If this is not the right place for reporting issues with clang-format, please let me know where I should post this instead.
The docs for the BreakBeforeBraces option of clang-format style [0] give the following example of Allman bracing:
try {
foo();
}
catch () {
}
void foo() { bar(); }
class foo {
};
if (foo()) {
}
else {
}
enum X : int { A, B };
This does not seem to be Allman style. In fact clang-format itself will reflow this example:
$ clang-format -style="{BreakBeforeBraces: Allman}" allman.cpp
try
{
foo();
}
catch ()
{
}
void foo() { bar(); }
class foo
{
};
if (foo())
{
}
else
{
}
enum X : int
{
A,
B
};
Is this a mistake in the documentation?
Thanks,
Matt
[0]: https://clang.llvm.org/docs/ClangFormatStyleOptions.html