YYLTYPE loc = this->get_location();
_mesa_glsl_error(& loc, state, "function `%s' redefined", name);
- sig = NULL;
}
}
} else if (state->symbols->name_declared_this_scope(name)) {
_mesa_glsl_error(& loc, state, "function name `%s' conflicts with "
"non-function", name);
- sig = NULL;
+ return NULL;
} else {
f = new(ctx) ir_function(name);
state->symbols->add_function(f->name, f);
prototype->hir(instructions, state);
ir_function_signature *signature = prototype->signature;
+ if (signature == NULL)
+ return NULL;
assert(state->current_function == NULL);
state->current_function = signature;