simplify Parser::isStartOfStmt: just use the current token instead of having

all of the clients pass in the current token.  NFC.


Swift SVN r16601
This commit is contained in:
Chris Lattner
2014-04-21 04:01:03 +00:00
parent d35a2f5c94
commit b204be71cd
4 changed files with 8 additions and 11 deletions

View File

@@ -46,8 +46,7 @@ static DefaultArgumentKind getDefaultArgKind(ExprHandle *init) {
static void recoverFromBadSelectorArgument(Parser &P) {
while (P.Tok.isNot(tok::eof) && P.Tok.isNot(tok::r_paren) &&
P.Tok.isNot(tok::l_brace) && P.Tok.isNot(tok::r_brace) &&
!P.isStartOfStmt(P.Tok) &&
!P.isStartOfDecl()) {
!P.isStartOfStmt() && !P.isStartOfDecl()) {
P.skipSingle();
}
P.consumeIf(tok::r_paren);