summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-03-20 13:53:11 +0000
committerDaniel Jasper <djasper@google.com>2013-03-20 13:53:11 +0000
commitaab220f3078108528b39406ed3643d23933243ac (patch)
tree0dc34c97907877afa83904e1340e8d72c731645b /clang/lib/Format/TokenAnnotator.cpp
parentc638a7127e060b5cbeae5f364ca1de0efa852cbe (diff)
downloadbcm5719-llvm-aab220f3078108528b39406ed3643d23933243ac.tar.gz
bcm5719-llvm-aab220f3078108528b39406ed3643d23933243ac.zip
Reduce penalty for breaks after "(" for functions with parameters.
Before: aaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: aaaaaaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 177521
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index c2b6c1b3e42..7c4797978f0 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -937,7 +937,7 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line,
return 20;
if (opensScope(Left))
- return 20;
+ return Left.ParameterCount > 1 ? prec::Comma : 20;
if (Right.is(tok::lessless)) {
if (Left.is(tok::string_literal)) {
OpenPOWER on IntegriCloud