From da817310c2c07a107d21e743370a09d4adfc4852 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Wed, 23 Jun 2010 14:38:41 +0200 Subject: Get rid of PostfixExpressionAST and store the base expression together with the PostfixAST nodes. --- src/shared/cplusplus/CheckExpression.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/shared/cplusplus/CheckExpression.cpp') diff --git a/src/shared/cplusplus/CheckExpression.cpp b/src/shared/cplusplus/CheckExpression.cpp index 17ac2ebfe9..6a24d3a51d 100644 --- a/src/shared/cplusplus/CheckExpression.cpp +++ b/src/shared/cplusplus/CheckExpression.cpp @@ -248,15 +248,6 @@ bool CheckExpression::visit(TypeConstructorCallAST *ast) return false; } -bool CheckExpression::visit(PostfixExpressionAST *ast) -{ - FullySpecifiedType exprTy = semantic()->check(ast->base_expression, _scope); - for (PostfixListAST *it = ast->postfix_expression_list; it; it = it->next) { - accept(it->value); // ### not exactly. - } - return false; -} - bool CheckExpression::visit(SizeofExpressionAST *ast) { FullySpecifiedType exprTy = semantic()->check(ast->expression, _scope); @@ -348,6 +339,7 @@ bool CheckExpression::visit(CompoundLiteralAST *ast) bool CheckExpression::visit(CallAST *ast) { + FullySpecifiedType baseTy = semantic()->check(ast->base_expression, _scope); for (ExpressionListAST *it = ast->expression_list; it; it = it->next) { FullySpecifiedType exprTy = semantic()->check(it->value, _scope); } @@ -356,18 +348,22 @@ bool CheckExpression::visit(CallAST *ast) bool CheckExpression::visit(ArrayAccessAST *ast) { + FullySpecifiedType baseTy = semantic()->check(ast->base_expression, _scope); FullySpecifiedType exprTy = semantic()->check(ast->expression, _scope); return false; } -bool CheckExpression::visit(PostIncrDecrAST *) +bool CheckExpression::visit(PostIncrDecrAST *ast) { + FullySpecifiedType baseTy = semantic()->check(ast->base_expression, _scope); return false; } bool CheckExpression::visit(MemberAccessAST *ast) { - (void) semantic()->check(ast->member_name, _scope); + FullySpecifiedType baseTy = semantic()->check(ast->base_expression, _scope); + const Name *memberName = semantic()->check(ast->member_name, _scope); + (void) memberName; return false; } -- cgit v1.2.1