aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-28 09:39:12 +0000
committerDaniel Jasper <djasper@google.com>2013-02-28 09:39:12 +0000
commit3a39ac7cee044cf7d9b524b529a97d5f075ee695 (patch)
treed08d4c4700464994df78238c3edbae1d412302b6 /lib/Format/Format.cpp
parent807809c421811509f488f3ebd249585025ad918a (diff)
Fix incorrect recognition of bin-packing.
Before (in Google style): Constructor() : aaaaa(aaaaaa), aaaaa(aaaaaa), aaaaa(aaaaaa), aaaaa(aaaaaa), aaaaa( aaaaaa) {} After: Constructor() : aaaaa(aaaaaa), aaaaa(aaaaaa), aaaaa(aaaaaa), aaaaa(aaaaaa), aaaaa(aaaaaa) {} git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176242 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index ea96b8f59d..e3f7b4b2e2 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -654,7 +654,8 @@ private:
AvoidBinPacking = false;
} else {
NewIndent = 4 + State.Stack.back().LastSpace;
- AvoidBinPacking = !Style.BinPackParameters;
+ AvoidBinPacking =
+ !Style.BinPackParameters || State.Stack.back().AvoidBinPacking;
}
State.Stack.push_back(
ParenState(NewIndent, State.Stack.back().LastSpace, AvoidBinPacking,