From e41051da2d44beecea21b5e26f301f957dc16679 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 28 Dec 2007 19:22:20 +0000 Subject: [PATCH] improve declaration counter [r18822] --- ast2firm.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.20.1