summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-07-15 14:33:14 +0000
committerDaniel Jasper <djasper@google.com>2013-07-15 14:33:14 +0000
commitfa21c0724cb96f4893cf90050da5715a49b98754 (patch)
treed43bebc57bc32fdb48ff2adbf5be237567c8fef6 /clang/lib/Format/TokenAnnotator.cpp
parenta928e1d7a1fac1e947f460966f74fcc93620958d (diff)
downloadbcm5719-llvm-fa21c0724cb96f4893cf90050da5715a49b98754.tar.gz
bcm5719-llvm-fa21c0724cb96f4893cf90050da5715a49b98754.zip
Improvement of change r186320.
Fixed a test that by now passed for the wrong reason. Before: llvm::outs() << "aaaaaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaa( aaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: llvm::outs() << "aaaaaaaaaaaaaaaaaaa: " << aaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaa); Also reformatted Format.cpp with the latest changes (1 formatting fix and 1 layout change of a <<-chain). llvm-svn: 186322
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index b903597b437..3bed432b19c 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -1082,9 +1082,9 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line,
Content = Content.drop_back(1).drop_front(1).trim();
if (Content.size() > 1 &&
(Content.back() == ':' || Content.back() == '='))
- return 50;
+ return 25;
}
- return prec::Shift;
+ return 1; // Breaking at a << is really cheap.
}
if (Left.Type == TT_ConditionalExpr)
return prec::Conditional;
OpenPOWER on IntegriCloud