aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/FormatTokenLexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/FormatTokenLexer.cpp')
-rw-r--r--clang/lib/Format/FormatTokenLexer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Format/FormatTokenLexer.cpp b/clang/lib/Format/FormatTokenLexer.cpp
index a90ba4a..db52add 100644
--- a/clang/lib/Format/FormatTokenLexer.cpp
+++ b/clang/lib/Format/FormatTokenLexer.cpp
@@ -253,7 +253,8 @@ void FormatTokenLexer::tryMergePreviousTokens() {
TT_BinaryOperator)) {
return;
}
- // Module paths in specify blocks and implications in properties.
+ // Module paths in specify blocks and the implication and boolean equality
+ // operators.
if (tryMergeTokensAny({{tok::plusequal, tok::greater},
{tok::plus, tok::star, tok::greater},
{tok::minusequal, tok::greater},
@@ -265,7 +266,8 @@ void FormatTokenLexer::tryMergePreviousTokens() {
{tok::pipe, tok::arrow},
{tok::hash, tok::minus, tok::hash},
{tok::hash, tok::equal, tok::hash}},
- TT_BinaryOperator)) {
+ TT_BinaryOperator) ||
+ Tokens.back()->is(tok::arrow)) {
Tokens.back()->ForcedPrecedence = prec::Comma;
return;
}