diff options
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index ca651eaa9440..464594bf7488 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -399,8 +399,7 @@ private: FormatToken *Next = CurrentToken->Next; if (PrevPrev && PrevPrev->is(tok::identifier) && Prev->isOneOf(tok::star, tok::amp, tok::ampamp) && - CurrentToken->is(tok::identifier) && - !Next->isOneOf(tok::equal, tok::l_brace)) { + CurrentToken->is(tok::identifier) && Next->isNot(tok::equal)) { Prev->setType(TT_BinaryOperator); LookForDecls = false; } @@ -2399,12 +2398,6 @@ private: return TT_PointerOrReference; } - // if (Class* obj { function() }) - if (PrevToken->Tok.isAnyIdentifier() && NextToken->Tok.isAnyIdentifier() && - NextToken->Next && NextToken->Next->is(tok::l_brace)) { - return TT_PointerOrReference; - } - if (PrevToken->endsSequence(tok::r_square, tok::l_square, tok::kw_delete)) return TT_UnaryOperator; |
