forked from OSchip/llvm-project
clang-format: Change Google style wrt. the formatting of empty messages.
Before: message Empty { } After: message Empty {} llvm-svn: 339803
This commit is contained in:
parent
00fb14da27
commit
67e6521a67
|
@ -819,7 +819,7 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
|
|||
GoogleStyle.JavaScriptQuotes = FormatStyle::JSQS_Single;
|
||||
GoogleStyle.JavaScriptWrapImports = false;
|
||||
} else if (Language == FormatStyle::LK_Proto) {
|
||||
GoogleStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;
|
||||
GoogleStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Empty;
|
||||
GoogleStyle.AlwaysBreakBeforeMultilineStrings = false;
|
||||
GoogleStyle.SpacesInContainerLiterals = false;
|
||||
GoogleStyle.Cpp11BracedListStyle = false;
|
||||
|
|
|
@ -397,29 +397,25 @@ TEST_F(FormatTestProto, FormatsService) {
|
|||
}
|
||||
|
||||
TEST_F(FormatTestProto, ExtendingMessage) {
|
||||
verifyFormat("extend .foo.Bar {\n"
|
||||
"}");
|
||||
verifyFormat("extend .foo.Bar {}");
|
||||
}
|
||||
|
||||
TEST_F(FormatTestProto, FormatsImports) {
|
||||
verifyFormat("import \"a.proto\";\n"
|
||||
"import \"b.proto\";\n"
|
||||
"// comment\n"
|
||||
"message A {\n"
|
||||
"}");
|
||||
"message A {}");
|
||||
|
||||
verifyFormat("import public \"a.proto\";\n"
|
||||
"import \"b.proto\";\n"
|
||||
"// comment\n"
|
||||
"message A {\n"
|
||||
"}");
|
||||
"message A {}");
|
||||
|
||||
// Missing semicolons should not confuse clang-format.
|
||||
verifyFormat("import \"a.proto\"\n"
|
||||
"import \"b.proto\"\n"
|
||||
"// comment\n"
|
||||
"message A {\n"
|
||||
"}");
|
||||
"message A {}");
|
||||
}
|
||||
|
||||
TEST_F(FormatTestProto, KeepsLongStringLiteralsOnSameLine) {
|
||||
|
|
Loading…
Reference in New Issue