summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-02-03 17:27:10 +0000
committerDaniel Jasper <djasper@google.com>2016-02-03 17:27:10 +0000
commit45860fac374980341e6837f5fd8fd63d34ed3b88 (patch)
tree7b7cda1761299a9b4447a04676a6008fc4c9f0e6 /clang/unittests/Format/FormatTest.cpp
parent169a6374dcab8a88f887fb3dcdaccdd97857c6ca (diff)
downloadbcm5719-llvm-45860fac374980341e6837f5fd8fd63d34ed3b88.tar.gz
bcm5719-llvm-45860fac374980341e6837f5fd8fd63d34ed3b88.zip
clang-format: Fix formatting of ternary expressions with comments.
Before: int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? /*bbbbbbbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb : ccccccccccccccccccccccccccc; After: int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? /*bbbbbbbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb : ccccccccccccccccccccccccccc; llvm-svn: 259670
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 6ffeb65280a..e03a484f290 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4694,6 +4694,10 @@ TEST_F(FormatTest, BreaksConditionalExpressionsAfterOperator) {
" ccccccccccccccc :\n"
" ddddddddddddddd);",
Style);
+ verifyFormat("int i = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ?\n"
+ " /*bbbbbbbbbbbbbbb=*/bbbbbbbbbbbbbbbbbbbbbbbbb :\n"
+ " ccccccccccccccccccccccccccc;",
+ Style);
}
TEST_F(FormatTest, DeclarationsOfMultipleVariables) {
OpenPOWER on IntegriCloud