Mesa (master): glsl: Add missing location info to case labels.
Eric Anholt
anholt at kemper.freedesktop.org
Fri Feb 3 10:29:55 UTC 2012
Module: Mesa
Branch: master
Commit: 663dcbbffeaedf0643e7e9d930ccfbcd698d1d9c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=663dcbbffeaedf0643e7e9d930ccfbcd698d1d9c
Author: Eric Anholt <eric at anholt.net>
Date: Mon Jan 30 09:41:55 2012 -0800
glsl: Add missing location info to case labels.
Otherwise, the upcoming error messages said the location was 0:0(0).
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/glsl/glsl_parser.yy | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index e774b46..8368d06 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -1691,10 +1691,12 @@ case_label:
CASE expression ':'
{
$$ = new(state) ast_case_label($2);
+ $$->set_location(yylloc);
}
| DEFAULT ':'
{
$$ = new(state) ast_case_label(NULL);
+ $$->set_location(yylloc);
}
;
More information about the mesa-commit
mailing list