clang-format: [Proto] Also supports implicit string literal concatenation
llvm-svn: 293995
This commit is contained in:
parent
a16cfe6fa9
commit
da910e0a8b
|
@ -2391,7 +2391,8 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line,
|
|||
Right.Next->is(tok::string_literal))
|
||||
return true;
|
||||
} else if (Style.Language == FormatStyle::LK_Cpp ||
|
||||
Style.Language == FormatStyle::LK_ObjC) {
|
||||
Style.Language == FormatStyle::LK_ObjC ||
|
||||
Style.Language == FormatStyle::LK_Proto) {
|
||||
if (Left.isStringLiteral() &&
|
||||
(Right.isStringLiteral() || Right.is(TT_ObjCStringLiteral)))
|
||||
return true;
|
||||
|
|
|
@ -135,6 +135,9 @@ TEST_F(FormatTestProto, MessageFieldAttributes) {
|
|||
" key: 'a' //\n"
|
||||
" }\n"
|
||||
"];");
|
||||
verifyFormat("optional string test = 1 [default =\n"
|
||||
" \"test\"\n"
|
||||
" \"test\"];");
|
||||
}
|
||||
|
||||
TEST_F(FormatTestProto, DoesntWrapFileOptions) {
|
||||
|
|
Loading…
Reference in New Issue