[PATCH] D82181: [clang-format] indent in chained conditionals when AlignOperands:DontAlign
Krasimir Georgiev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 19 08:38:01 PDT 2020
krasimir updated this revision to Diff 272084.
krasimir added a comment.
- add a regression test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82181/new/
https://reviews.llvm.org/D82181
Files:
clang/unittests/Format/FormatTest.cpp
Index: clang/unittests/Format/FormatTest.cpp
===================================================================
--- clang/unittests/Format/FormatTest.cpp
+++ clang/unittests/Format/FormatTest.cpp
@@ -6281,6 +6281,13 @@
" : bbbbbbbbbbbbbbbbbbbbbbb ? 2222222222222222\n"
" : 3333333333333333;",
Style);
+
+ Style.AlignOperands = FormatStyle::OAS_DontAlign;
+ Style.BreakBeforeTernaryOperators = false;
+ verifyFormat("int x = aaaaaaaaaaaaaaa ? aaaaaaaaaaaaaaaaaa :\n"
+ " bbbb ? cccccccccccccccccc :\n"
+ " ddddd;\n",
+ Style);
}
TEST_F(FormatTest, BreaksConditionalExpressionsAfterOperator) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82181.272084.patch
Type: text/x-patch
Size: 771 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200619/2b403efe/attachment.bin>
More information about the cfe-commits
mailing list