summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 1eb7021ac69..0676df6c0e3 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -714,8 +714,10 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedToken &Tok) {
(Left.isNot(tok::comma) && Left.isNot(tok::semi)))
return 20;
- if (Left.is(tok::semi) || Left.is(tok::comma))
+ if (Left.is(tok::semi))
return 0;
+ if (Left.is(tok::comma))
+ return 1;
// In Objective-C method expressions, prefer breaking before "param:" over
// breaking after it.
OpenPOWER on IntegriCloud