From: Matthias Braun Date: Fri, 28 Dec 2007 19:22:20 +0000 (+0000) Subject: improve declaration counter X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=e41051da2d44beecea21b5e26f301f957dc16679;p=cparser improve declaration counter [r18822] --- diff --git a/ast2firm.c b/ast2firm.c index 714e013..ce26eb9 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -3841,6 +3841,14 @@ static int count_decls_in_expression(const expression_t *expression) { } EXPR_UNARY_CASES return count_decls_in_expression(expression->unary.value); + case EXPR_CALL: { + int count = 0; + call_argument_t *argument = expression->call.arguments; + for( ; argument != NULL; argument = argument->next) { + count += count_decls_in_expression(argument->expression); + } + return count; + } default: break;