Update the function's scope.

This commit is contained in:
Roberto Raggi
2010-08-16 11:04:40 +02:00
parent 29354ff129
commit 5cc32e1079

View File

@@ -1724,6 +1724,8 @@ bool Bind::visit(SimpleDeclarationAST *ast)
setDeclSpecifiers(decl, type); setDeclSpecifiers(decl, type);
if (Function *fun = decl->type()->asFunctionType()) { if (Function *fun = decl->type()->asFunctionType()) {
fun->setScope(_scope);
setDeclSpecifiers(fun, type); setDeclSpecifiers(fun, type);
if (declaratorId && declaratorId->name) if (declaratorId && declaratorId->name)
fun->setName(declaratorId->name->name); // update the function name fun->setName(declaratorId->name->name); // update the function name