diff options
author | Ian Romanick <[email protected]> | 2018-11-01 13:47:58 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2018-11-08 10:59:53 -0800 |
commit | 011abfc963a734953a0edd9c7a4fa01570627050 (patch) | |
tree | 0131c9f7fc1908c8d03555f39e3c78c461bbd37f /src/compiler/glsl/tests | |
parent | d28bc35ece9c6e0d9f40c1540bd147a6face6207 (diff) |
glsl: Add warning tests for identifiers with __
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/compiler/glsl/tests')
-rw-r--r-- | src/compiler/glsl/tests/warnings/031-__-in-function-name.vert | 22 | ||||
-rw-r--r-- | src/compiler/glsl/tests/warnings/031-__-in-function-name.vert.expected | 3 |
2 files changed, 25 insertions, 0 deletions
diff --git a/src/compiler/glsl/tests/warnings/031-__-in-function-name.vert b/src/compiler/glsl/tests/warnings/031-__-in-function-name.vert new file mode 100644 index 00000000000..84d643d4509 --- /dev/null +++ b/src/compiler/glsl/tests/warnings/031-__-in-function-name.vert @@ -0,0 +1,22 @@ +#version 130 + +float __foo(float x) +{ + return 6.0 * x; +} + +float __bar(float x) +{ + return 3.0 * x; +} + +float __blat(float x) +{ + return 2.0 * x; +} + +void main() +{ + gl_Position = vec4(__foo(gl_Vertex.x), __bar(gl_Vertex.y), __blat(gl_Vertex.z), 1.0); +} + diff --git a/src/compiler/glsl/tests/warnings/031-__-in-function-name.vert.expected b/src/compiler/glsl/tests/warnings/031-__-in-function-name.vert.expected new file mode 100644 index 00000000000..1111ee44175 --- /dev/null +++ b/src/compiler/glsl/tests/warnings/031-__-in-function-name.vert.expected @@ -0,0 +1,3 @@ +0:3(7): warning: identifier `__foo' uses reserved `__' string +0:8(7): warning: identifier `__bar' uses reserved `__' string +0:13(7): warning: identifier `__blat' uses reserved `__' string |