diff options
Diffstat (limited to 'src/shared/cplusplus/CheckExpression.cpp')
-rw-r--r-- | src/shared/cplusplus/CheckExpression.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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); + } } } |