summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-11-23 15:55:45 +0000
committerDaniel Jasper <djasper@google.com>2015-11-23 15:55:45 +0000
commit253dad2323b4a9288d57f8d1fd63743fd979bde4 (patch)
treec101c7c1bf3bf3bd1b256855ae71f1f7086d4cd5 /clang/lib
parent8a0654836e468650a2c2f7301e627db937a82118 (diff)
downloadbcm5719-llvm-253dad2323b4a9288d57f8d1fd63743fd979bde4.tar.gz
bcm5719-llvm-253dad2323b4a9288d57f8d1fd63743fd979bde4.zip
clang-format: If the template list of a variable declaration spans
multiple lines, also break before the variable name. Before: std::vector<aaaaaa, // wrap aa> aaa; After: std::vector<aaaaaa, // wrap aa> aaa; llvm-svn: 253871
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index 72157bd6415..e41ae9769af 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -144,6 +144,7 @@ bool ContinuationIndenter::mustBreak(const LineState &State) {
if (Previous.is(tok::semi) && State.LineContainsContinuedForLoopSection)
return true;
if ((startsNextParameter(Current, Style) || Previous.is(tok::semi) ||
+ (Previous.is(TT_TemplateCloser) && Current.is(TT_StartOfName)) ||
(Style.BreakBeforeTernaryOperators && Current.is(TT_ConditionalExpr) &&
Previous.isNot(tok::question)) ||
(!Style.BreakBeforeTernaryOperators &&
OpenPOWER on IntegriCloud