From aff9a743668575898d5eafe30e8e240e4a53342a Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Tue, 10 Nov 2009 14:16:39 +0100 Subject: Cleanup NewArrayDeclaratorAST --- src/shared/cplusplus/CheckExpression.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/shared/cplusplus/CheckExpression.cpp') diff --git a/src/shared/cplusplus/CheckExpression.cpp b/src/shared/cplusplus/CheckExpression.cpp index 14ced9509a..763258dfda 100644 --- a/src/shared/cplusplus/CheckExpression.cpp +++ b/src/shared/cplusplus/CheckExpression.cpp @@ -207,8 +207,10 @@ bool CheckExpression::visit(NewExpressionAST *ast) if (ast->new_type_id) { FullySpecifiedType ty = semantic()->check(ast->new_type_id->type_specifier, _scope); - for (NewArrayDeclaratorAST *it = ast->new_type_id->new_array_declarators; it; it = it->next) { - FullySpecifiedType exprTy = semantic()->check(it->expression, _scope); + for (NewArrayDeclaratorListAST *it = ast->new_type_id->new_array_declarators; it; it = it->next) { + if (NewArrayDeclaratorAST *declarator = it->value) { + FullySpecifiedType exprTy = semantic()->check(declarator->expression, _scope); + } } } -- cgit v1.2.1