krasimir created this revision. krasimir added a reviewer: djasper. Herald added subscribers: cfe-commits, klimek.
Commonly string literals in protos are already multiline, so breaking them further is undesirable. 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,11 @@ if (Language == FormatStyle::LK_TextProto) { FormatStyle GoogleStyle = getGoogleStyle(FormatStyle::LK_Proto); GoogleStyle.Language = FormatStyle::LK_TextProto; + + // In protos, string literals are commonly multiline and already broken-up. + // Don't break them up even further, especially since we don't support + // reflowing them. + GoogleStyle.BreakStringLiterals = false; return GoogleStyle; }
Index: lib/Format/Format.cpp =================================================================== --- lib/Format/Format.cpp +++ lib/Format/Format.cpp @@ -675,6 +675,11 @@ if (Language == FormatStyle::LK_TextProto) { FormatStyle GoogleStyle = getGoogleStyle(FormatStyle::LK_Proto); GoogleStyle.Language = FormatStyle::LK_TextProto; + + // In protos, string literals are commonly multiline and already broken-up. + // Don't break them up even further, especially since we don't support + // reflowing them. + GoogleStyle.BreakStringLiterals = false; return GoogleStyle; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits