C++: Fix: disallow empty nested declarators, it's invalid.

This commit is contained in:
Erik Verbruggen
2010-09-15 16:18:49 +02:00
parent 0f0d6cf8a4
commit 6e51fffd22

View File

@@ -1436,7 +1436,7 @@ bool Parser::parseAbstractCoreDeclarator(DeclaratorAST *&node, SpecifierListAST
unsigned after_ptr_operators = cursor();
if (LA() == T_LPAREN) {
if (LA() == T_LPAREN && LA(2) != T_RPAREN) {
unsigned lparen_token = consumeToken();
DeclaratorAST *declarator = 0;
if (parseAbstractDeclarator(declarator, decl_specifier_list) && LA() == T_RPAREN) {