Fixes DEQP's scoping.invalid.redeclare_function_fragment/vertex.
v2: Fix accidental rejection of prototype+decl.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> (v1)
Tested-by: Matt Turner <mattst88@gmail.com>
*/
return NULL;
}
+ } else if (state->language_version == 100 && !is_definition) {
+ /* From the GLSL 1.00 spec, section 4.2.7:
+ *
+ * "A particular variable, structure or function declaration
+ * may occur at most once within a scope with the exception
+ * that a single function prototype plus the corresponding
+ * function definition are allowed."
+ */
+ YYLTYPE loc = this->get_location();
+ _mesa_glsl_error(&loc, state, "function `%s' redeclared", name);
}
}
}