Fix crash with function declarations with unnamed parameters.
Fixes issue #103. Previously, we were inadvertently grabbing the function's return type for the parameter, rather than the actual parameter type.
This commit is contained in:
2
decl.cpp
2
decl.cpp
@@ -237,7 +237,7 @@ Declarator::GetType(DeclSpecs *ds) const {
|
||||
sprintf(buf, "__anon_parameter_%d", i);
|
||||
sym = new Symbol(buf, pos);
|
||||
Declarator *declarator = new Declarator(sym, sym->pos);
|
||||
sym->type = declarator->GetType(ds);
|
||||
sym->type = declarator->GetType(d->declSpecs);
|
||||
d->declarators.push_back(declarator);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user