glsl/glcpp: Emit error for duplicate parameter name in function-like macro
authorCarl Worth <cworth@cworth.org>
Wed, 25 Jun 2014 20:41:47 +0000 (13:41 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 29 Jul 2014 22:11:50 +0000 (15:11 -0700)
commit34cd293c8ac6df6284f94fd456eee7ddc847c5df
treef04865bbda7f5fe42b0d1e61e97c12a3e5ed7094
parentfe1e0ac8524677c40c84f238650e0e198f0e8d36
glsl/glcpp: Emit error for duplicate parameter name in function-like macro

This will emit an error for something like:

#define FOO(x,x) ...

Obviously, it's not a legal thing to do, and it's easy to check.

Add a "make check" test for this as well.

This fixes the following Khronos GLES3 CTS tests:

invalid_function_definitions.unique_param_name_vertex
invalid_function_definitions.unique_param_name_fragment

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/glsl/glcpp/glcpp-parse.y
src/glsl/glcpp/tests/135-duplicate-parameter.c [new file with mode: 0644]
src/glsl/glcpp/tests/135-duplicate-parameter.c.expected [new file with mode: 0644]