summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-10-16 09:10:11 +0000
committerDaniel Jasper <djasper@google.com>2014-10-16 09:10:11 +0000
commit1a31bab301362d8537cd1eb605942a6548e55fd8 (patch)
tree59af4eb2c4c51acefb5596bf0d2ebaa98dfdaf95 /clang/unittests/Format/FormatTest.cpp
parent823d8f6246ff96156bbab7432a4142140361e697 (diff)
downloadbcm5719-llvm-1a31bab301362d8537cd1eb605942a6548e55fd8.tar.gz
bcm5719-llvm-1a31bab301362d8537cd1eb605942a6548e55fd8.zip
clang-format: Fix behavior with comments before conditional expressions
Before: SomeFunction(aaaaaaaaaaaaaaaaa, // comment. ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb); After: SomeFunction(aaaaaaaaaaaaaaaaa, // comment. ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb); llvm-svn: 219921
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index b195df4291c..aebfef6fbea 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4060,6 +4060,12 @@ TEST_F(FormatTest, BreaksConditionalExpressions) {
" ?: aaaaaaaaaaaaaaa);\n"
"}",
NoBinPacking);
+
+ verifyFormat("SomeFunction(aaaaaaaaaaaaaaaaa,\n"
+ " // comment.\n"
+ " ccccccccccccccccccccccccccccccccccccccc\n"
+ " ? aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
+ " : bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb);");
}
TEST_F(FormatTest, BreaksConditionalExpressionsAfterOperator) {
OpenPOWER on IntegriCloud