From: Eric Anholt Date: Mon, 30 Jan 2012 17:41:55 +0000 (-0800) Subject: glsl: Add missing location info to case labels. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=663dcbbffeaedf0643e7e9d930ccfbcd698d1d9c;p=mesa.git 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 --- diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index e774b4697ad..8368d063a6d 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); } ;