clang-format: Improve alignment after 'return'.
Previously, comments, could totally confuse it.
Before:
return
// true if code is one of a or b.
code == a ||
code == b;
After:
return
// true if code is one of a or b.
code == a || code == b;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191654 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 833a87c..dfdeae1 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -3103,6 +3103,9 @@
verifyFormat("return aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) &&\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;");
+ verifyFormat("return\n"
+ " // true if code is one of a or b.\n"
+ " code == a || code == b;");
}
TEST_F(FormatTest, BreaksConditionalExpressions) {