diff options
author | Manuel Klimek <klimek@google.com> | 2014-03-28 09:27:09 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2014-03-28 09:27:09 +0000 |
commit | 9481556eb637cb617f8a739a4a57520f64cdd933 (patch) | |
tree | 979347c6478ef508aacbf898179bf86a04c3e533 /clang/lib/Format/TokenAnnotator.cpp | |
parent | 1788325fdaf75af9b7836dc6a1549ea8e6f83910 (diff) | |
download | bcm5719-llvm-9481556eb637cb617f8a739a4a57520f64cdd933.tar.gz bcm5719-llvm-9481556eb637cb617f8a739a4a57520f64cdd933.zip |
Get rid of the adapted isLiteral method.
We don't want to deviate from clang's standard terminology.
llvm-svn: 204997
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index c3312cc66bd..6a0e03461ee 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -862,9 +862,12 @@ private: PrevToken->MatchingParen->Previous->is(tok::kw_typeof)) return TT_PointerOrReference; - if (PrevToken->isLiteral() || - PrevToken->isOneOf(tok::r_paren, tok::r_square) || - NextToken->isLiteral() || NextToken->isUnaryOperator() || + if (PrevToken->Tok.isLiteral() || + PrevToken->isOneOf(tok::r_paren, tok::r_square, tok::kw_true, + tok::kw_false) || + NextToken->Tok.isLiteral() || + NextToken->isOneOf(tok::kw_true, tok::kw_false) || + NextToken->isUnaryOperator() || // If we know we're in a template argument, there are no named // declarations. Thus, having an identifier on the right-hand side // indicates a binary operator. |