summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckExpression.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-06-04 12:54:15 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2009-06-04 12:54:15 +0200
commit1c9a724a2fa61fde8ee39c373e277f144655eab5 (patch)
treea8702ef169bea947773db1b5806f35b6d8b264f5 /src/shared/cplusplus/CheckExpression.cpp
parent90efa0f174ba4ecc0853ef065075f1d363edd22c (diff)
downloadqt-creator-1c9a724a2fa61fde8ee39c373e277f144655eab5.tar.gz
Check new-expressions.
Diffstat (limited to 'src/shared/cplusplus/CheckExpression.cpp')
-rw-r--r--src/shared/cplusplus/CheckExpression.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/shared/cplusplus/CheckExpression.cpp b/src/shared/cplusplus/CheckExpression.cpp
index 6e83ce47bf..08801a5b54 100644
--- a/src/shared/cplusplus/CheckExpression.cpp
+++ b/src/shared/cplusplus/CheckExpression.cpp
@@ -210,17 +210,30 @@ bool CheckExpression::visit(TemplateIdAST *ast)
bool CheckExpression::visit(NewExpressionAST *ast)
{
- // ### FIXME
- // ### process ast->new_placement
+ if (ast->new_placement) {
+ for (ExpressionListAST *it = ast->new_placement->expression_list; it; it = it->next) {
+ FullySpecifiedType exprTy = semantic()->check(it->expression, _scope);
+ Q_UNUSED(exprTy);
+ }
+ }
FullySpecifiedType typeIdTy = semantic()->check(ast->type_id, _scope);
if (ast->new_type_id) {
FullySpecifiedType ty = semantic()->check(ast->new_type_id->type_specifier, _scope);
- // ### process ast->new_type_id
+ Q_UNUSED(ty);
+
+ for (NewArrayDeclaratorAST *it = ast->new_type_id->new_array_declarators; it; it = it->next) {
+ FullySpecifiedType exprTy = semantic()->check(it->expression, _scope);
+ Q_UNUSED(exprTy);
+ }
}
// ### process new-initializer
+ if (ast->new_initializer) {
+ FullySpecifiedType exprTy = semantic()->check(ast->new_initializer->expression, _scope);
+ Q_UNUSED(exprTy);
+ }
return false;
}