Cleanup postfix declarators.

This commit is contained in:
Roberto Raggi
2009-11-10 14:33:51 +01:00
parent a7219736b6
commit 24b6c858eb
10 changed files with 18 additions and 28 deletions

View File

@@ -458,7 +458,7 @@ bool CheckUndefinedSymbols::visit(SizeofExpressionAST *ast)
} else if (type_id->declarator
&& type_id->declarator->postfix_declarators
&& ! type_id->declarator->postfix_declarators->next
&& type_id->declarator->postfix_declarators->asArrayDeclarator() != 0) {
&& type_id->declarator->postfix_declarators->value->asArrayDeclarator() != 0) {
// this sizeof expression is ambiguos, e.g.
// sizeof(a[10])
// `a' can be a typeid or an expression.

View File

@@ -416,8 +416,8 @@ bool FindUsages::visit(ParameterDeclarationAST *ast)
if (! _inSimpleDeclaration) // visit the core declarator only if we are not in simple-declaration.
accept(declarator->core_declarator);
for (PostfixDeclaratorAST *fx_op = declarator->postfix_declarators; fx_op; fx_op = fx_op->next)
accept(fx_op);
for (PostfixDeclaratorListAST *it = declarator->postfix_declarators; it; it = it->next)
accept(it->value);
for (SpecifierAST *spec = declarator->post_attributes; spec; spec = spec->next)
accept(spec);