forked from qt-creator/qt-creator
Warn for undefined types (not finished yet).
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user