summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/ContinuationIndenter.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-11-14 13:14:45 +0000
committerDaniel Jasper <djasper@google.com>2014-11-14 13:14:45 +0000
commit6c0ee17b8973eb8622a982d96f6f2d0397b8e58b (patch)
tree9480fc02498aac582a411f16d6b7815b25dfeb4e /clang/lib/Format/ContinuationIndenter.cpp
parent8ff672d397aa23849cbcb1b4a0358ff7c1e76973 (diff)
downloadbcm5719-llvm-6c0ee17b8973eb8622a982d96f6f2d0397b8e58b.tar.gz
bcm5719-llvm-6c0ee17b8973eb8622a982d96f6f2d0397b8e58b.zip
clang-format: Improve function parameter packing.
Before: void SomeLoooooooooooongFunction( std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> aaaaaaaaaaaaaaaaaaaaaaaaaa, int bbbbbbbbbbbbb); After: void SomeLoooooooooooongFunction( std::unique_ptr<aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa> aaaaaaaaaaaaaaaaaaaaaaaaaa, int bbbbbbbbbbbbb); llvm-svn: 221989
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index 7fdc1af09b7..c8dbd962e87 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -464,7 +464,8 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State,
if (PreviousNonComment &&
!PreviousNonComment->isOneOf(tok::comma, tok::semi) &&
- PreviousNonComment->Type != TT_TemplateCloser &&
+ (PreviousNonComment->Type != TT_TemplateCloser ||
+ Current.NestingLevel != 0) &&
PreviousNonComment->Type != TT_BinaryOperator &&
PreviousNonComment->Type != TT_JavaAnnotation &&
PreviousNonComment->Type != TT_LeadingJavaAnnotation &&
OpenPOWER on IntegriCloud