summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/FormatToken.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/FormatToken.cpp')
-rw-r--r--clang/lib/Format/FormatToken.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp
index c147dbb6b1b..a7c003bc18a 100644
--- a/clang/lib/Format/FormatToken.cpp
+++ b/clang/lib/Format/FormatToken.cpp
@@ -132,6 +132,11 @@ void CommaSeparatedList::precomputeFormattingInfos(const FormatToken *Token) {
if (!Token->MatchingParen || Token->isNot(tok::l_brace))
return;
+ // In C++11 braced list style, we should not format in columns unless we allow
+ // bin-packing of function parameters.
+ if (Style.Cpp11BracedListStyle && !Style.BinPackParameters)
+ return;
+
FormatToken *ItemBegin = Token->Next;
SmallVector<bool, 8> MustBreakBeforeItem;
OpenPOWER on IntegriCloud