symbol->setStorage(storage);
if (Function *funTy = symbol->asFunction()) {
- if (declSpecifiers.isVirtual())
+ if (declSpecifiers.isVirtual()) {
funTy->setVirtual(true);
+ }
}
if (declSpecifiers.isDeprecated())
setDeclSpecifiers(decl, type);
if (Function *fun = decl->type()->asFunctionType()) {
+ setDeclSpecifiers(fun, type);
if (declaratorId && declaratorId->name)
fun->setName(declaratorId->name->name); // update the function name
}
bool Bind::visit(FunctionDefinitionAST *ast)
{
// unsigned qt_invokable_token = ast->qt_invokable_token;
- FullySpecifiedType type;
+ FullySpecifiedType declSpecifiers;
for (SpecifierListAST *it = ast->decl_specifier_list; it; it = it->next) {
- type = this->specifier(it->value, type);
+ declSpecifiers = this->specifier(it->value, declSpecifiers);
}
DeclaratorIdAST *declaratorId = 0;
- type = this->declarator(ast->declarator, type, &declaratorId);
+ FullySpecifiedType type = this->declarator(ast->declarator, declSpecifiers.qualifiedType(), &declaratorId);
Function *fun = type->asFunctionType();
ast->symbol = fun;
if (fun) {
- setDeclSpecifiers(fun, type);
+ setDeclSpecifiers(fun, declSpecifiers);
if (_scope->isClass()) {
fun->setVisibility(_visibility);