Warn for undefined types (not finished yet).

This commit is contained in:
Roberto Raggi
2009-06-04 11:32:01 +02:00
parent 57cd26548e
commit f55d5500c5
3 changed files with 135 additions and 5 deletions

View File

@@ -208,13 +208,20 @@ bool CheckExpression::visit(TemplateIdAST *ast)
return false;
}
bool CheckExpression::visit(NewExpressionAST *)
bool CheckExpression::visit(NewExpressionAST *ast)
{
// ### FIXME
//FullySpecifiedType exprTy = semantic()->check(ast->expression, _scope);
//FullySpecifiedType typeIdTy = semantic()->check(ast->type_id, _scope);
// ### process new-typeid
// ### process ast->new_placement
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
}
// ### process new-initializer
return false;
}

View File

@@ -73,6 +73,10 @@ Name *CheckName::check(NameAST *name, Scope *scope)
Name *previousName = switchName(0);
Scope *previousScope = switchScope(scope);
accept(name);
if (_name && name)
name->name = _name;
(void) switchScope(previousScope);
return switchName(previousName);
}