forked from OSchip/llvm-project
clang-format: Don't bin-pack text-proto-formatted options.
Before: repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa: AAAAAAAAAA, bbbbbbb: BBBB, bbbb: BBB}]; After: repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa: AAAAAAAAAA, bbbbbbb: BBBB, bbbb: BBB}]; llvm-svn: 207538
This commit is contained in:
parent
0f250ed55f
commit
883ae9d9a3
|
@ -725,6 +725,7 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State,
|
|||
AvoidBinPacking = Current.BlockKind == BK_Block ||
|
||||
Current.Type == TT_ArrayInitializerLSquare ||
|
||||
Current.Type == TT_DictLiteral ||
|
||||
Style.Language == FormatStyle::LK_Proto ||
|
||||
!Style.BinPackParameters ||
|
||||
(NextNoComment &&
|
||||
NextNoComment->Type == TT_DesignatedInitializerPeriod);
|
||||
|
|
|
@ -88,6 +88,10 @@ TEST_F(FormatTestProto, MessageFieldAttributes) {
|
|||
verifyFormat("repeated double value = 1\n"
|
||||
" [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa: AAAAAAAAAA\n"
|
||||
" bbbbbbbbbbbbbbbb: BBBBBBBBBB}];");
|
||||
verifyFormat("repeated double value = 1\n"
|
||||
" [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa: AAAAAAAAAA,\n"
|
||||
" bbbbbbb: BBBB,\n"
|
||||
" bbbb: BBB}];");
|
||||
}
|
||||
|
||||
TEST_F(FormatTestProto, FormatsOptions) {
|
||||
|
|
Loading…
Reference in New Issue