clang-format: Break before 'else' in Stroustrup style.
Seems to be the desired thing to do according to:
http://www.stroustrup.com/Programming/PPP-style-rev3.pdf
Patch by Jarkko Hietaniemi, thank you!
llvm-svn: 214857
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 8089b3e..e0841ca 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -7677,6 +7677,17 @@
"}",
BreakBeforeBrace);
+ verifyFormat("void foo()\n"
+ "{\n"
+ " if (a) {\n"
+ " a();\n"
+ " }\n"
+ " else {\n"
+ " b();\n"
+ " }\n"
+ "}\n",
+ BreakBeforeBrace);
+
verifyFormat("#ifdef _DEBUG\n"
"int foo(int i = 0)\n"
"#else\n"