summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Bind.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-08-13 16:17:44 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-08-13 16:55:43 +0200
commit0540aa362de61c9ef19f3efb9e63839ac0b0e0be (patch)
tree7f9bf6c600f513a3673fc473511824b82911f2fc /src/shared/cplusplus/Bind.cpp
parent6659e3ecba7279f933280ea3f07fcc0730476b64 (diff)
downloadqt-creator-0540aa362de61c9ef19f3efb9e63839ac0b0e0be.tar.gz
Get rid of the old Semantic pass.
Diffstat (limited to 'src/shared/cplusplus/Bind.cpp')
-rw-r--r--src/shared/cplusplus/Bind.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/shared/cplusplus/Bind.cpp b/src/shared/cplusplus/Bind.cpp
index 7ee2d8cf1b..436f68ebc1 100644
--- a/src/shared/cplusplus/Bind.cpp
+++ b/src/shared/cplusplus/Bind.cpp
@@ -162,11 +162,20 @@ void Bind::operator()(DeclarationAST *ast, Scope *scope)
(void) switchScope(previousScope);
}
-void Bind::operator()(ExpressionAST *ast, Scope *scope)
+FullySpecifiedType Bind::operator()(ExpressionAST *ast, Scope *scope)
{
Scope *previousScope = switchScope(scope);
- expression(ast);
+ FullySpecifiedType ty = expression(ast);
(void) switchScope(previousScope);
+ return ty;
+}
+
+FullySpecifiedType Bind::operator()(NewTypeIdAST *ast, Scope *scope)
+{
+ Scope *previousScope = switchScope(scope);
+ FullySpecifiedType ty = newTypeId(ast);
+ (void) switchScope(previousScope);
+ return ty;
}
void Bind::statement(StatementAST *ast)
@@ -1875,7 +1884,7 @@ bool Bind::visit(FunctionDefinitionAST *ast)
this->ctorInitializer(ast->ctor_initializer, fun);
- if (! _skipFunctionBodies && ast->function_body) {
+ if (fun && ! _skipFunctionBodies && ast->function_body) {
Scope *previousScope = switchScope(fun);
this->statement(ast->function_body);
(void) switchScope(previousScope);