aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 5140639d00..e4dc291312 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -969,7 +969,8 @@ private:
Tok.Parent->Type == TT_CastRParen)
return TT_UnaryOperator;
- if (PrevToken.Tok.isLiteral() || NextToken.Tok.isLiteral() ||
+ if (PrevToken.Tok.isLiteral() || PrevToken.Tok.is(tok::r_paren) ||
+ PrevToken.Tok.is(tok::r_square) || NextToken.Tok.isLiteral() ||
NextToken.Tok.is(tok::plus) || NextToken.Tok.is(tok::minus) ||
NextToken.Tok.is(tok::plusplus) || NextToken.Tok.is(tok::minusminus) ||
NextToken.Tok.is(tok::tilde) || NextToken.Tok.is(tok::exclaim) ||