glsl/glcpp: Promote "extra token at end of directive" from warning to error
authorCarl Worth <cworth@cworth.org>
Fri, 13 Jun 2014 22:40:42 +0000 (15:40 -0700)
committerCarl Worth <cworth@cworth.org>
Wed, 9 Jul 2014 19:05:14 +0000 (12:05 -0700)
commit43047384c331a9240339563704fe5d97ebe599d7
treebfbaa15c9fc0b606b2c24520ecfaef41a95a768e
parentdac3c986c546b674873f217e3137c3bcd25663a7
glsl/glcpp: Promote "extra token at end of directive" from warning to error

We've always warned about this case, but a recent confromance test expects
this to be an error that causes compilation to fail. Make it so.

Also add a "make check" test to ensure these errors are generated.

This fixes the following Khronos GLES3 conformance tests:

invalid_conditionals.tokens_after_ifdef_vertex
invalid_conditionals.tokens_after_ifdef_fragment
invalid_conditionals.tokens_after_ifndef_vertex
invalid_conditionals.tokens_after_ifndef_fragment

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/glcpp/glcpp-parse.y
src/glsl/glcpp/tests/126-garbage-after-directive.c [new file with mode: 0644]
src/glsl/glcpp/tests/126-garbage-after-directive.c.expected [new file with mode: 0644]