diff options
author | Krasimir Georgiev <krasimir@google.com> | 2018-01-24 11:18:39 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2018-01-24 11:18:39 +0000 |
commit | eda222e7beb1b3490a83a77d7ae26493aa180a88 (patch) | |
tree | 19f8a301eebf7fedd22c6d6421eacdea2e214448 /clang/lib/Format/Format.cpp | |
parent | 21e545d08d2c6a167da0200b2d642e66e838fac7 (diff) | |
download | bcm5719-llvm-eda222e7beb1b3490a83a77d7ae26493aa180a88.tar.gz bcm5719-llvm-eda222e7beb1b3490a83a77d7ae26493aa180a88.zip |
[clang-format] Disable string literal breaking for text protos
Summary:
Commonly string literals in protos are already multiline, so breaking them
further is undesirable.
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D42373
llvm-svn: 323319
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 0da0cea708c..b709e9f84a7 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -675,6 +675,12 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { if (Language == FormatStyle::LK_TextProto) { FormatStyle GoogleStyle = getGoogleStyle(FormatStyle::LK_Proto); GoogleStyle.Language = FormatStyle::LK_TextProto; + + // Text protos are currently mostly formatted inside C++ raw string literals + // and often the current breaking behavior of string literals is not + // beneficial there. Investigate turning this on once proper string reflow + // has been implemented. + GoogleStyle.BreakStringLiterals = false; return GoogleStyle; } |