diff options
author | Daniel Jasper <djasper@google.com> | 2013-09-30 08:29:03 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-09-30 08:29:03 +0000 |
commit | eabede6d1b290080437617bec38697dfbca923b4 (patch) | |
tree | 8c78e25f660b091ae8b91af338ffca8b9b3e85b2 /clang/unittests/Format/FormatTest.cpp | |
parent | 92bd47aaa5c8eb733a7b622fd569ce1b073585f0 (diff) | |
download | bcm5719-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.cpp | 3 |
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) { |