Added semantic checks for stray semicolons and topldevel empty declarations.

This commit is contained in:
Roberto Raggi
2010-12-16 12:25:51 +01:00
parent 476dda1b43
commit 88fe5a50a1
8 changed files with 30 additions and 2 deletions

View File

@@ -1546,6 +1546,9 @@ bool Parser::parseEnumSpecifier(SpecifierListAST *&node)
enumerator_ptr = &(*enumerator_ptr)->next;
}
if (LA() == T_COMMA && LA(2) == T_RBRACE)
ast->stray_comma_token = consumeToken();
if (LA() != T_RBRACE)
match(T_COMMA, &comma_token);
}