diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-15 16:49:44 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-15 16:49:44 +0000 |
commit | b130a54940171a95422a20a07ee8fdfe009806a5 (patch) | |
tree | 8aba0b99ef2cecf015563387a23f384715e3867d /lib/Format/Format.cpp | |
parent | 2e85e743dc3d5b2f7ee6cd94a0c35fbc2e40e829 (diff) |
Re-enable ConstructorInitializerAllOnOneLineOrOnePerLine option.
This got lost and was untested as the same effect is achieved by
avoiding bin packing, which is active in Google style by default.
However, moving forward, we want more control over the bin packing
option(s) and thus, this flag should work as expected.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 4b63aa9322..939211cf65 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -580,6 +580,9 @@ private: State.Stack.back().FirstLessLess = State.Column; if (Current.is(tok::question)) State.Stack.back().QuestionColumn = State.Column; + if (Current.Type == TT_CtorInitializerColon && + Style.ConstructorInitializerAllOnOneLineOrOnePerLine) + State.Stack.back().AvoidBinPacking = true; if (Current.is(tok::l_brace) && Current.MatchingParen != NULL && !Current.MatchingParen->MustBreakBefore) { if (getLengthToMatchingParen(Current) + State.Column > getColumnLimit()) |