diff options
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index c8dfb13d78a..7f298555079 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1100,10 +1100,8 @@ unsigned TokenAnnotator::splitPenalty(const AnnotatedLine &Line, Left.Type == TT_InheritanceColon) return 2; - if (Right.isOneOf(tok::arrow, tok::period) && - Right.Type != TT_DesignatedInitializerPeriod) { - if (Left.isOneOf(tok::r_paren, tok::r_square) && Left.MatchingParen && - Left.MatchingParen->ParameterCount > 0) + if (Right.isMemberAccess()) { + if (Left.isOneOf(tok::r_paren, tok::r_square)) return 20; // Should be smaller than breaking at a nested comma. return 150; } |