X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=walk_statements.c;h=4c8a6c6e59d7dd00df4ed14395472912ffe4e4c1;hb=233b4629181c4a07fbabe8566c10ce2bae9224de;hp=ff26889cf3af27458a9951579b0069068c552c77;hpb=1f36beb621b353950b2d73415e08ccdba815abea;p=cparser diff --git a/walk_statements.c b/walk_statements.c index ff26889..4c8a6c6 100644 --- a/walk_statements.c +++ b/walk_statements.c @@ -1,3 +1,22 @@ +/* + * This file is part of cparser. + * Copyright (C) 2007-2009 Matthias Braun + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ #include #include "adt/error.h" @@ -75,6 +94,19 @@ static void walk_expression(expression_t const *const expr, return; } + case EXPR_VA_START: + walk_expression(expr->va_starte.ap, callback, env); + return; + + case EXPR_VA_ARG: + walk_expression(expr->va_arge.ap, callback, env); + return; + + case EXPR_VA_COPY: + walk_expression(expr->va_copye.src, callback, env); + walk_expression(expr->va_copye.dst, callback, env); + return; + case EXPR_INVALID: case EXPR_OFFSETOF: case EXPR_REFERENCE: @@ -85,9 +117,6 @@ static void walk_expression(expression_t const *const expr, case EXPR_STRING_LITERAL: case EXPR_WIDE_STRING_LITERAL: case EXPR_FUNCNAME: - case EXPR_BUILTIN_SYMBOL: - case EXPR_VA_START: - case EXPR_VA_ARG: case EXPR_LABEL_ADDRESS: case EXPR_BUILTIN_TYPES_COMPATIBLE_P: break;