diff options
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index cb4e4f53b2f..431be41e0a3 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -636,16 +636,11 @@ unsigned ContinuationIndenter::moveStateToNextToken(LineState &State, } State.Stack.pop_back(); } - bool IsObjCBlock = - Previous && - (Previous->is(tok::caret) || - (Previous->is(tok::r_paren) && Previous->MatchingParen && - Previous->MatchingParen->Previous && - Previous->MatchingParen->Previous->is(tok::caret))); // For some reason, ObjC blocks are indented like continuations. NewIndent = - State.Stack.back().LastSpace + - (IsObjCBlock ? Style.ContinuationIndentWidth : Style.IndentWidth); + State.Stack.back().LastSpace + (Current.Type == TT_ObjCBlockLBrace + ? Style.ContinuationIndentWidth + : Style.IndentWidth); ++NewIndentLevel; BreakBeforeParameter = true; } else { |