diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-18 13:24:21 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-18 13:24:21 +0000 |
commit | 9ed9ade0ef42ab9f20a888df2c01addb057ceca0 (patch) | |
tree | 6ccbede02bcdc36e505e299242d20f72837e8dd2 /clang/lib/Format | |
parent | 55d7ba6b661974ae69b8a3012e5bb02d03b6735c (diff) | |
download | bcm5719-llvm-9ed9ade0ef42ab9f20a888df2c01addb057ceca0.tar.gz bcm5719-llvm-9ed9ade0ef42ab9f20a888df2c01addb057ceca0.zip |
Improve formatting of builder-type calls.
Before:
aaaaaaa->aaaaaaa->aaaaaaaaaaaaaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)->aaaaaaaa(aaaaaaaaaaaaaaa);
After:
aaaaaaa->aaaaaaa
->aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
->aaaaaaaa(aaaaaaaaaaaaaaa);
llvm-svn: 175441
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 19582f2ed28..92c3f1d41c8 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -874,7 +874,7 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line, return 5; if (Right.is(tok::arrow) || Right.is(tok::period)) { - if (Left.is(tok::r_paren) && Line.Type == LT_BuilderTypeCall) + if (Line.Type == LT_BuilderTypeCall) return 5; // Should be smaller than breaking at a nested comma. if ((Left.is(tok::r_paren) || Left.is(tok::r_square)) && Left.MatchingParen && Left.MatchingParen->ParameterCount > 0) |