aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.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
commitab55018afcf7651d15b7e0aa4b4cf0f9e25904d2 (patch)
tree0d3f0e4904f6877d3b1522aba28448a5af7a242b /lib/Format/Format.cpp
parent295d429ca14e466be8d785ae4737fcf62a706918 (diff)
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 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 5807db9407..5c7ce85178 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -766,6 +766,7 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
GoogleStyle.JavaScriptWrapImports = false;
} else if (Language == FormatStyle::LK_Proto) {
GoogleStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;
+ GoogleStyle.AlwaysBreakBeforeMultilineStrings = false;
GoogleStyle.SpacesInContainerLiterals = false;
GoogleStyle.Cpp11BracedListStyle = false;
// This affects protocol buffer options specifications and text protos.