From 663dcbbffeaedf0643e7e9d930ccfbcd698d1d9c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 30 Jan 2012 09:41:55 -0800 Subject: [PATCH] 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 --- src/glsl/glsl_parser.yy | 2 ++ 1 file changed, 2 insertions(+) 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); } ; -- 2.30.2