- size_t i;
-
- for (i = 0; i < decl->args->count; ++i) {
- if (!validate_decl_arg(data, decl->args->args[i])) {
- return 0;
+ size_t i = 0;
+ struct psi_decl_arg *arg;
+
+ while (psi_plist_get(decl->args, i++, &arg)) {
+ if (!arg->var->name) {
+ arg->var->name = malloc(7);
+ snprintf(arg->var->name, 6, "arg%zu", i);
+ arg->var->fqn = strdup(arg->var->name);
+ }
+ if (!psi_decl_arg_validate(data, arg, type_stack)) {
+ return false;