]> granicus.if.org Git - clang/commit
[clang-format] Do not break before long string literals in protos
authorKrasimir Georgiev <krasimir@google.com>
Thu, 8 Feb 2018 10:47:12 +0000 (10:47 +0000)
committerKrasimir Georgiev <krasimir@google.com>
Thu, 8 Feb 2018 10:47:12 +0000 (10:47 +0000)
commit6e19a38a868acf59198715d73d4db72e92483193
tree1fc0dde10af7fc1437a4da6cf0b4cdfc15bd6d1f
parent4baa2a7fd0c866c7badaaf49c7faff59e0a49e3e
[clang-format] Do not break before long string literals in protos

Summary:
This patch is a follow-up to r323319 (which disables string literal breaking for
text protos) and it disables breaking before long string literals.

For example this:
```
keyyyyy: "long string literal"
```
used to get broken into:
```
keyyyyy:
    "long string literal"
```

While at it, I also enabled it for LK_Proto and fixed a bug in the mustBreak code.

Reviewers: djasper, sammccall

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D42957

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324591 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/ContinuationIndenter.cpp
lib/Format/Format.cpp
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestProto.cpp
unittests/Format/FormatTestTextProto.cpp