summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-10-18 16:34:40 +0000
committerDaniel Jasper <djasper@google.com>2013-10-18 16:34:40 +0000
commitd8c36d09b18d3103e91d66a4ec0a355d30f5a7f3 (patch)
treeb3ffeb90747cb53422cacfbeed0b0d64a358bee2 /clang/lib/Format
parent5a366fb4dca613da243d00cf3426ebb44492c2ee (diff)
downloadbcm5719-llvm-d8c36d09b18d3103e91d66a4ec0a355d30f5a7f3.tar.gz
bcm5719-llvm-d8c36d09b18d3103e91d66a4ec0a355d30f5a7f3.zip
Make clang-format slightly more willing to break before trailing annotations.
Specifically, prefer breaking before trailing annotations over breaking before the first parameter. Before: void ffffffffffffffffffffffff( int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) OVERRIDE; After: void ffffffffffffffffffffffff(int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) OVERRIDE; llvm-svn: 192983
Diffstat (limited to 'clang/lib/Format')
-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 4d95ecfe4f9..9bc109787ae 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1157,7 +1157,7 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line,
if (Left.is(tok::r_paren) && Line.Type != LT_ObjCProperty &&
(Right.is(tok::kw_const) || (Right.is(tok::identifier) && Right.Next &&
Right.Next->isNot(tok::l_paren))))
- return 150;
+ return 100;
// In for-loops, prefer breaking at ',' and ';'.
if (Line.First->is(tok::kw_for) && Left.is(tok::equal))
OpenPOWER on IntegriCloud