diff options
author | dim <dim@FreeBSD.org> | 2015-06-21 14:00:56 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-06-21 14:00:56 +0000 |
commit | 9dd834653b811ad20382e98a87dff824980c9916 (patch) | |
tree | a764184c2fc9486979b074250b013a0937ee64e5 /lib/Parse/ParseStmt.cpp | |
parent | bb9760db9b86e93a638ed430d0a14785f7ff9064 (diff) | |
download | FreeBSD-src-9dd834653b811ad20382e98a87dff824980c9916.zip FreeBSD-src-9dd834653b811ad20382e98a87dff824980c9916.tar.gz |
Vendor import of clang trunk r240225:
https://llvm.org/svn/llvm-project/cfe/trunk@240225
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r-- | lib/Parse/ParseStmt.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp index 055bdea..b658cef 100644 --- a/lib/Parse/ParseStmt.cpp +++ b/lib/Parse/ParseStmt.cpp @@ -119,15 +119,12 @@ namespace { class StatementFilterCCC : public CorrectionCandidateCallback { public: StatementFilterCCC(Token nextTok) : NextToken(nextTok) { - WantTypeSpecifiers = nextTok.is(tok::l_paren) || nextTok.is(tok::less) || - nextTok.is(tok::identifier) || nextTok.is(tok::star) || - nextTok.is(tok::amp) || nextTok.is(tok::l_square); - WantExpressionKeywords = nextTok.is(tok::l_paren) || - nextTok.is(tok::identifier) || - nextTok.is(tok::arrow) || nextTok.is(tok::period); - WantRemainingKeywords = nextTok.is(tok::l_paren) || nextTok.is(tok::semi) || - nextTok.is(tok::identifier) || - nextTok.is(tok::l_brace); + WantTypeSpecifiers = nextTok.isOneOf(tok::l_paren, tok::less, tok::l_square, + tok::identifier, tok::star, tok::amp); + WantExpressionKeywords = + nextTok.isOneOf(tok::l_paren, tok::identifier, tok::arrow, tok::period); + WantRemainingKeywords = + nextTok.isOneOf(tok::l_paren, tok::semi, tok::identifier, tok::l_brace); WantCXXNamedCasts = false; } @@ -1427,7 +1424,7 @@ bool Parser::isForRangeIdentifier() { if (Next.is(tok::colon)) return true; - if (Next.is(tok::l_square) || Next.is(tok::kw_alignas)) { + if (Next.isOneOf(tok::l_square, tok::kw_alignas)) { TentativeParsingAction PA(*this); ConsumeToken(); SkipCXX11Attributes(); |