aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-06-21 14:00:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-06-21 14:00:56 +0000
commit2e645aa5697838f16ec570eb07c2bee7e13d0e0b (patch)
treea764184c2fc9486979b074250b013a0937ee64e5 /lib/Parse/ParseStmt.cpp
parent798321d8eb5630cd4a8f490a4f25e32ef195fb07 (diff)
downloadsrc-2e645aa5697838f16ec570eb07c2bee7e13d0e0b.tar.gz
src-2e645aa5697838f16ec570eb07c2bee7e13d0e0b.zip
Vendor import of clang trunk r240225:vendor/clang/clang-trunk-r240225
Notes
Notes: svn path=/vendor/clang/dist/; revision=284679 svn path=/vendor/clang/clang-trunk-r240225/; revision=284680; tag=vendor/clang/clang-trunk-r240225
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r--lib/Parse/ParseStmt.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index 055bdeabf623..b658cef234ec 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();