summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-04-24 13:46:00 +0000
committerDaniel Jasper <djasper@google.com>2013-04-24 13:46:00 +0000
commit085a2edaea151b03468c54579a239b53499712b8 (patch)
tree07e56a27291fc66d8880f799a1f21a1e136723dc /clang/lib/Format/Format.cpp
parent4eb5eb5bc85fa5574a42f5e1750d3dcb2652f5c2 (diff)
downloadbcm5719-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.cpp3
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;
OpenPOWER on IntegriCloud