diff options
author | Alexander Kornienko <alexfh@google.com> | 2014-03-06 15:13:08 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2014-03-06 15:13:08 +0000 |
commit | 86b2dfdc3bbcac9f1040ab3c0245815b070f2f01 (patch) | |
tree | 78fd35f99d3015b66ccb7c320845df9dea4ec41b /clang/lib/Format/ContinuationIndenter.cpp | |
parent | 8cbf633715fe0b6ffa838221a96ffb0e558625b7 (diff) | |
download | bcm5719-llvm-86b2dfdc3bbcac9f1040ab3c0245815b070f2f01.tar.gz bcm5719-llvm-86b2dfdc3bbcac9f1040ab3c0245815b070f2f01.zip |
Fix operator<< recognition (PR19064).
llvm-svn: 203123
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index 5ea2488395d..b82726a6b83 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -174,7 +174,8 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { } // Same as above, but for the first "<<" operator. - if (Current.is(tok::lessless) && State.Stack.back().BreakBeforeParameter && + if (Current.is(tok::lessless) && Current.Type != TT_OverloadedOperator && + State.Stack.back().BreakBeforeParameter && State.Stack.back().FirstLessLess == 0) return true; @@ -515,7 +516,8 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State, if (Current.Type == TT_InheritanceColon) State.Stack.back().AvoidBinPacking = true; - if (Current.is(tok::lessless) && State.Stack.back().FirstLessLess == 0) + if (Current.is(tok::lessless) && Current.Type != TT_OverloadedOperator && + State.Stack.back().FirstLessLess == 0) State.Stack.back().FirstLessLess = State.Column; if (Current.Type == TT_ArraySubscriptLSquare && State.Stack.back().StartOfArraySubscripts == 0) |