I assume the example is wrong as it's clearly missing line-breaks before braces. That's about my level of understanding and I am totally oblivious to any finer details.
I just ran the example through clang-format with .clang-format like this:
BreakBeforeBraces: Allman