aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2013-11-18 08:17:37 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2013-11-18 08:17:37 +0000
commitee6507dfdc5da99f60ae14e489065b1b304d7e46 (patch)
tree293304d6f9e6d4e8722901e40cb9f72b85b9e4d9 /clang/lib/Parse/ParseTentative.cpp
parent39d0c93b70439b110229116d135c5056ed199dbe (diff)
downloadllvm-ee6507dfdc5da99f60ae14e489065b1b304d7e46.zip
llvm-ee6507dfdc5da99f60ae14e489065b1b304d7e46.tar.gz
llvm-ee6507dfdc5da99f60ae14e489065b1b304d7e46.tar.bz2
Replaced bool parameters in SkipUntil function with single bit-based parameter.
llvm-svn: 194994
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r--clang/lib/Parse/ParseTentative.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp
index b35d632..a1d6b13 100644
--- a/clang/lib/Parse/ParseTentative.cpp
+++ b/clang/lib/Parse/ParseTentative.cpp
@@ -159,7 +159,7 @@ Parser::TPResult Parser::TryConsumeDeclarationSpecifier() {
if (Tok.isNot(tok::l_paren))
return TPResult::Error();
ConsumeParen();
- if (!SkipUntil(tok::r_paren, false))
+ if (!SkipUntil(tok::r_paren))
return TPResult::Error();
break;
}
@@ -183,14 +183,14 @@ Parser::TPResult Parser::TryConsumeDeclarationSpecifier() {
Tok.is(tok::kw___declspec) || Tok.is(tok::kw_alignas)) {
if (Tok.is(tok::l_square)) {
ConsumeBracket();
- if (!SkipUntil(tok::r_square, false))
+ if (!SkipUntil(tok::r_square))
return TPResult::Error();
} else {
ConsumeToken();
if (Tok.isNot(tok::l_paren))
return TPResult::Error();
ConsumeParen();
- if (!SkipUntil(tok::r_paren, false))
+ if (!SkipUntil(tok::r_paren))
return TPResult::Error();
}
}
@@ -294,7 +294,7 @@ Parser::TPResult Parser::TryParseInitDeclaratorList() {
if (Tok.is(tok::l_paren)) {
// Parse through the parens.
ConsumeParen();
- if (!SkipUntil(tok::r_paren))
+ if (!SkipUntil(tok::r_paren, StopAtSemi))
return TPResult::Error();
} else if (Tok.is(tok::l_brace)) {
// A left-brace here is sufficient to disambiguate the parse; an
@@ -517,7 +517,7 @@ Parser::isCXX11AttributeSpecifier(bool Disambiguate,
if (!getLangOpts().ObjC1) {
ConsumeBracket();
- bool IsAttribute = SkipUntil(tok::r_square, false);
+ bool IsAttribute = SkipUntil(tok::r_square);
IsAttribute &= Tok.is(tok::r_square);
PA.Revert();
@@ -589,7 +589,7 @@ Parser::isCXX11AttributeSpecifier(bool Disambiguate,
// Parse the attribute-argument-clause, if present.
if (Tok.is(tok::l_paren)) {
ConsumeParen();
- if (!SkipUntil(tok::r_paren, false)) {
+ if (!SkipUntil(tok::r_paren)) {
IsAttribute = false;
break;
}
@@ -1550,7 +1550,7 @@ Parser::TPResult Parser::TryParseTypeofSpecifier() {
assert(Tok.is(tok::l_paren) && "Expected '('");
// Parse through the parens after 'typeof'.
ConsumeParen();
- if (!SkipUntil(tok::r_paren))
+ if (!SkipUntil(tok::r_paren, StopAtSemi))
return TPResult::Error();
return TPResult::Ambiguous();
@@ -1744,8 +1744,7 @@ Parser::TryParseParameterDeclarationClause(bool *InvalidAsDeclaration,
// '=' assignment-expression
// Parse through assignment-expression.
// FIXME: assignment-expression may contain an unparenthesized comma.
- if (!SkipUntil(tok::comma, tok::r_paren, true/*StopAtSemi*/,
- true/*DontConsume*/))
+ if (!SkipUntil(tok::comma, tok::r_paren, StopAtSemi | StopBeforeMatch))
return TPResult::Error();
}
@@ -1789,7 +1788,7 @@ Parser::TPResult Parser::TryParseFunctionDeclarator() {
return TPR;
// Parse through the parens.
- if (!SkipUntil(tok::r_paren))
+ if (!SkipUntil(tok::r_paren, StopAtSemi))
return TPResult::Error();
// cv-qualifier-seq
@@ -1810,7 +1809,7 @@ Parser::TPResult Parser::TryParseFunctionDeclarator() {
// Parse through the parens after 'throw'.
ConsumeParen();
- if (!SkipUntil(tok::r_paren))
+ if (!SkipUntil(tok::r_paren, StopAtSemi))
return TPResult::Error();
}
if (Tok.is(tok::kw_noexcept)) {
@@ -1819,7 +1818,7 @@ Parser::TPResult Parser::TryParseFunctionDeclarator() {
if (Tok.is(tok::l_paren)) {
// Find the matching rparen.
ConsumeParen();
- if (!SkipUntil(tok::r_paren))
+ if (!SkipUntil(tok::r_paren, StopAtSemi))
return TPResult::Error();
}
}
@@ -1831,7 +1830,7 @@ Parser::TPResult Parser::TryParseFunctionDeclarator() {
///
Parser::TPResult Parser::TryParseBracketDeclarator() {
ConsumeBracket();
- if (!SkipUntil(tok::r_square))
+ if (!SkipUntil(tok::r_square, StopAtSemi))
return TPResult::Error();
return TPResult::Ambiguous();