diff options
author | Daniel Jasper <djasper@google.com> | 2018-03-12 10:32:18 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2018-03-12 10:32:18 +0000 |
commit | ab55018afcf7651d15b7e0aa4b4cf0f9e25904d2 (patch) | |
tree | 0d3f0e4904f6877d3b1522aba28448a5af7a242b /unittests/Format/FormatTestProto.cpp | |
parent | 295d429ca14e466be8d785ae4737fcf62a706918 (diff) | |
download | clang-ab55018afcf7651d15b7e0aa4b4cf0f9e25904d2.tar.gz |
clang-format: Properly handle implicit string concatenation in text protos
Three issues to fix:
- char_constants weren't properly treated as string literals
- Prevening the break after "label: " does not make sense in concunction
with AlwaysBreakBeforeMultilineStrings. It leads to situations where
clang-format just cannot find a viable format (it must break and yet
it must not break).
- AlwaysBreakBeforeMultilineStrings should not be on for LK_TextProto in
Google style.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTestProto.cpp')
-rw-r--r-- | unittests/Format/FormatTestProto.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/unittests/Format/FormatTestProto.cpp b/unittests/Format/FormatTestProto.cpp index 6db44c765b..66c5d3778d 100644 --- a/unittests/Format/FormatTestProto.cpp +++ b/unittests/Format/FormatTestProto.cpp @@ -158,9 +158,8 @@ TEST_F(FormatTestProto, MessageFieldAttributes) { " key: 'a' //\n" " }\n" "];"); - verifyFormat("optional string test = 1 [default =\n" - " \"test\"\n" - " \"test\"];"); + verifyFormat("optional string test = 1 [default = \"test\"\n" + " \"test\"];"); verifyFormat("optional Aaaaaaaa aaaaaaaa = 12 [\n" " (aaa) = aaaa,\n" " (bbbbbbbbbbbbbbbbbbbbbbbbbb) = {\n" |