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 | 94d6ad7b65b59f834bbc40e0caed5ceebca11932 (patch) | |
tree | c95357059fba2942804ef4335063f8ecdcd7aa3b /lib/Format | |
parent | 4cdc0cde1396df5d937c39c626abe99760197654 (diff) |
Flip flag to merge short if-statements into one line for Google style.
This now allows clang-format to do:
if (a) return;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180187 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format')
-rw-r--r-- | lib/Format/Format.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 0c3f85d124..b483308a5a 100644 --- a/lib/Format/Format.cpp +++ b/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; |