diff options
| author | Daniel Jasper <djasper@google.com> | 2013-04-24 13:46:00 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2013-04-24 13:46:00 +0000 |
| commit | 085a2edaea151b03468c54579a239b53499712b8 (patch) | |
| tree | 07e56a27291fc66d8880f799a1f21a1e136723dc /clang/lib/Format/Format.cpp | |
| parent | 4eb5eb5bc85fa5574a42f5e1750d3dcb2652f5c2 (diff) | |
| download | bcm5719-llvm-085a2edaea151b03468c54579a239b53499712b8.tar.gz bcm5719-llvm-085a2edaea151b03468c54579a239b53499712b8.zip | |
Flip flag to merge short if-statements into one line for Google style.
This now allows clang-format to do:
if (a) return;
llvm-svn: 180187
Diffstat (limited to 'clang/lib/Format/Format.cpp')
| -rw-r--r-- | clang/lib/Format/Format.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 0c3f85d1247..b483308a5a4 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -67,7 +67,7 @@ FormatStyle getGoogleStyle() { GoogleStyle.BinPackParameters = true; GoogleStyle.AllowAllParametersOfDeclarationOnNextLine = true; GoogleStyle.ConstructorInitializerAllOnOneLineOrOnePerLine = true; - GoogleStyle.AllowShortIfStatementsOnASingleLine = false; + GoogleStyle.AllowShortIfStatementsOnASingleLine = true; GoogleStyle.ObjCSpaceBeforeProtocolList = false; GoogleStyle.PenaltyExcessCharacter = 1000000; GoogleStyle.PenaltyReturnTypeOnItsOwnLine = 200; @@ -77,6 +77,7 @@ FormatStyle getGoogleStyle() { FormatStyle getChromiumStyle() { FormatStyle ChromiumStyle = getGoogleStyle(); ChromiumStyle.AllowAllParametersOfDeclarationOnNextLine = false; + ChromiumStyle.AllowShortIfStatementsOnASingleLine = false; ChromiumStyle.BinPackParameters = false; ChromiumStyle.Standard = FormatStyle::LS_Cpp03; ChromiumStyle.DerivePointerBinding = false; |

