summaryrefslogtreecommitdiff
path: root/src/glsl/glsl_parser_extras.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-06-29 09:59:40 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-29 11:12:54 -0700
commit6de825650560198eb97f19e72b2d56e68e3d7a63 (patch)
tree6d2a132288a0526b9f32eb02e67c46040e5cd558 /src/glsl/glsl_parser_extras.h
parentac04c257e31fe012dac750bcf5bf3134ba07ebdc (diff)
glsl2: Check for non-void functions that don't have a return statement.
This doesn't do any control flow analysis to ensure that the return statements are actually reached. Fixes piglit tests function5.frag and function-07.vert.
Diffstat (limited to 'src/glsl/glsl_parser_extras.h')
-rw-r--r--src/glsl/glsl_parser_extras.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.h b/src/glsl/glsl_parser_extras.h
index cfe02e3b0c..726bafa7e4 100644
--- a/src/glsl/glsl_parser_extras.h
+++ b/src/glsl/glsl_parser_extras.h
@@ -51,6 +51,9 @@ struct _mesa_glsl_parse_state {
*/
class ir_function_signature *current_function;
+ /** Have we found a return statement in this function? */
+ bool found_return;
+
/** Was there an error during compilation? */
bool error;