summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestProto.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2018-03-12 10:32:18 +0000
committerDaniel Jasper <djasper@google.com>2018-03-12 10:32:18 +0000
commit9c95dfe65863122539837ed174d07cd5ecff6010 (patch)
tree24d2ef801e40e5e3ecff8f8fdceb9b0f88a0d02e /clang/unittests/Format/FormatTestProto.cpp
parent19e238746b2def4c2944dd8e2a95a45119a401cb (diff)
downloadbcm5719-llvm-9c95dfe65863122539837ed174d07cd5ecff6010.tar.gz
bcm5719-llvm-9c95dfe65863122539837ed174d07cd5ecff6010.zip
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. llvm-svn: 327255
Diffstat (limited to 'clang/unittests/Format/FormatTestProto.cpp')
-rw-r--r--clang/unittests/Format/FormatTestProto.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp
index 6db44c765b4..66c5d3778d4 100644
--- a/clang/unittests/Format/FormatTestProto.cpp
+++ b/clang/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"
OpenPOWER on IntegriCloud