summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-09-30 08:29:03 +0000
committerDaniel Jasper <djasper@google.com>2013-09-30 08:29:03 +0000
commiteabede6d1b290080437617bec38697dfbca923b4 (patch)
tree8c78e25f660b091ae8b91af338ffca8b9b3e85b2 /clang/unittests/Format/FormatTest.cpp
parent92bd47aaa5c8eb733a7b622fd569ce1b073585f0 (diff)
downloadbcm5719-llvm-eabede6d1b290080437617bec38697dfbca923b4.tar.gz
bcm5719-llvm-eabede6d1b290080437617bec38697dfbca923b4.zip
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; llvm-svn: 191654
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 833a87c4fd0..dfdeae1a1e0 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -3103,6 +3103,9 @@ TEST_F(FormatTest, AlignsAfterReturn) {
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) {
OpenPOWER on IntegriCloud