diff options
| author | Daniel Jasper <djasper@google.com> | 2015-01-04 20:40:45 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2015-01-04 20:40:45 +0000 |
| commit | fd4ed1840207f10bc09729620a4abd0baaebeeb3 (patch) | |
| tree | e6677d3045b24b0d8dada56048c334b63c4a08d9 /clang/lib/Format | |
| parent | 49e6bc024d0269f580e8601aecf17eaf5537df50 (diff) | |
| download | bcm5719-llvm-fd4ed1840207f10bc09729620a4abd0baaebeeb3.tar.gz bcm5719-llvm-fd4ed1840207f10bc09729620a4abd0baaebeeb3.zip | |
clang-format: [Java] Change a few flags for Google's Java style.
No tests added as all of these are already tested separately.
llvm-svn: 225141
Diffstat (limited to 'clang/lib/Format')
| -rw-r--r-- | clang/lib/Format/Format.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 81c9e130d5a..adcb94f7b9d 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -419,7 +419,9 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { if (Language == FormatStyle::LK_Java) { GoogleStyle.AlignAfterOpenBracket = false; GoogleStyle.AlignOperands = false; + GoogleStyle.AlignTrailingComments = false; GoogleStyle.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Empty; + GoogleStyle.AllowShortIfStatementsOnASingleLine = false; GoogleStyle.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment; GoogleStyle.ColumnLimit = 100; GoogleStyle.SpaceAfterCStyleCast = true; @@ -440,6 +442,8 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) { FormatStyle getChromiumStyle(FormatStyle::LanguageKind Language) { FormatStyle ChromiumStyle = getGoogleStyle(Language); if (Language == FormatStyle::LK_Java) { + ChromiumStyle.AlignTrailingComments = true; + ChromiumStyle.AllowShortIfStatementsOnASingleLine = true; ChromiumStyle.IndentWidth = 4; ChromiumStyle.ContinuationIndentWidth = 8; } else { |

