diff options
author | Daniel Jasper <djasper@google.com> | 2013-08-30 08:29:25 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-08-30 08:29:25 +0000 |
commit | f79b0b15623a9138d629dac7f7928fa9630d83bc (patch) | |
tree | 403a798ce617909e28c146e534ef4d67e97ea008 /clang/lib/Format/ContinuationIndenter.cpp | |
parent | 2cf664fb86e0abbf8d9000e9a71f31e0fa1203d4 (diff) | |
download | bcm5719-llvm-f79b0b15623a9138d629dac7f7928fa9630d83bc.tar.gz bcm5719-llvm-f79b0b15623a9138d629dac7f7928fa9630d83bc.zip |
clang-format: Fix incorrect indentation.
Before:
aaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc(
dddddddddddddddddddddddddddddd));
aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(
dddddddddddddddddddddddddddddd));
After:
aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbb.ccccccccccccccccc(
dddddddddddddddddddddddddddddd));
aaaaaaaaaaa(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb(
dddddddddddddddddddddddddddddd));
This was overlooked when interducing the new builder-type call
detection in r189337. Also, some minor reorganization of a test.
llvm-svn: 189658
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index 2737b8d5269..878580e8920 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -410,13 +410,12 @@ unsigned ContinuationIndenter::addTokenToState(LineState &State, bool Newline, // OuterFunction(InnerFunctionCall( // ParameterToInnerFunction), // SecondParameterToOuterFunction); - bool HasMultipleParameters = !Current.FakeLParens.empty(); bool HasTrailingCall = false; if (Previous.MatchingParen) { const FormatToken *Next = Previous.MatchingParen->getNextNonComment(); HasTrailingCall = Next && Next->isMemberAccess(); } - if (HasMultipleParameters || + if (startsBinaryExpression(Current) || (HasTrailingCall && State.Stack[State.Stack.size() - 2].CallContinuation == 0)) State.Stack.back().LastSpace = State.Column; |