summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJava.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-12-08 21:28:31 +0000
committerDaniel Jasper <djasper@google.com>2014-12-08 21:28:31 +0000
commita536df4b28b2ab1ab495d45d674e32f5eec23a28 (patch)
treed19137ad3b3e7ac6947ba680b437c2895a7e0fdc /clang/unittests/Format/FormatTestJava.cpp
parent025f860638d20ed3c9774934f301647643ac8dc8 (diff)
downloadbcm5719-llvm-a536df4b28b2ab1ab495d45d674e32f5eec23a28.tar.gz
bcm5719-llvm-a536df4b28b2ab1ab495d45d674e32f5eec23a28.zip
clang-format: Indent correctly in conditional expressions after return.
This only applies when not aligning after the return itself (which is commonly done for C++. Before: return aaaaaaaaaa ? bbbbbbbbbb( bbbbbb) // This is indented relative to aaaaaaaaaa. : b; After: return aaaaaaaaaa ? bbbbbbbbbb( bbbbbb) : b; llvm-svn: 223694
Diffstat (limited to 'clang/unittests/Format/FormatTestJava.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJava.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJava.cpp b/clang/unittests/Format/FormatTestJava.cpp
index 91b38ad7588..6f7e43f325c 100644
--- a/clang/unittests/Format/FormatTestJava.cpp
+++ b/clang/unittests/Format/FormatTestJava.cpp
@@ -373,6 +373,11 @@ TEST_F(FormatTestJava, NeverAlignAfterReturn) {
" .bbbbbbbbbbbbbbbbbbb()\n"
" .ccccccccccccccccccc();",
getStyleWithColumns(40));
+ verifyFormat("return aaaaaaaaaaaaaaaaaaa()\n"
+ " .bbbbbbbbbbbbbbbbbbb(\n"
+ " ccccccccccccccc)\n"
+ " .ccccccccccccccccccc();",
+ getStyleWithColumns(40));
}
TEST_F(FormatTestJava, FormatsInnerBlocks) {
OpenPOWER on IntegriCloud