[PATCH] D36701: Use Token::isOneOf method in Parser.
Frederich Munch via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 16 08:09:41 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL325352: Use Token::isOneOf method in Parser. (authored by marsupial, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D36701?vs=111034&id=134629#toc
Repository:
rL LLVM
https://reviews.llvm.org/D36701
Files:
cfe/trunk/include/clang/Parse/Parser.h
Index: cfe/trunk/include/clang/Parse/Parser.h
===================================================================
--- cfe/trunk/include/clang/Parse/Parser.h
+++ cfe/trunk/include/clang/Parse/Parser.h
@@ -379,15 +379,15 @@
/// isTokenParen - Return true if the cur token is '(' or ')'.
bool isTokenParen() const {
- return Tok.getKind() == tok::l_paren || Tok.getKind() == tok::r_paren;
+ return Tok.isOneOf(tok::l_paren, tok::r_paren);
}
/// isTokenBracket - Return true if the cur token is '[' or ']'.
bool isTokenBracket() const {
- return Tok.getKind() == tok::l_square || Tok.getKind() == tok::r_square;
+ return Tok.isOneOf(tok::l_square, tok::r_square);
}
/// isTokenBrace - Return true if the cur token is '{' or '}'.
bool isTokenBrace() const {
- return Tok.getKind() == tok::l_brace || Tok.getKind() == tok::r_brace;
+ return Tok.isOneOf(tok::l_brace, tok::r_brace);
}
/// isTokenStringLiteral - True if this token is a string-literal.
bool isTokenStringLiteral() const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36701.134629.patch
Type: text/x-patch
Size: 1034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180216/8f701bdb/attachment.bin>
More information about the cfe-commits
mailing list