[PATCH] D42373: [clang-format] Disable string literal breaking for text protos

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 24 03:18:37 PST 2018


krasimir updated this revision to Diff 131216.
krasimir added a comment.

- Update comment


Repository:
  rC Clang

https://reviews.llvm.org/D42373

Files:
  lib/Format/Format.cpp


Index: lib/Format/Format.cpp
===================================================================
--- lib/Format/Format.cpp
+++ lib/Format/Format.cpp
@@ -675,6 +675,12 @@
   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;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42373.131216.patch
Type: text/x-patch
Size: 689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180124/9202de59/attachment.bin>


More information about the cfe-commits mailing list