Use line number information from entire function expression
authorKevin Rogovin <kevin.rogovin@intel.com>
Mon, 9 Dec 2013 08:38:35 +0000 (10:38 +0200)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 20 Dec 2013 17:03:54 +0000 (09:03 -0800)
This patch changes the error reporting behavior for incorrect function
invocation (triggered by match_function_by_name() unable to find a
matching function call) from using the line number information
associated to the function name term to using the line number
information of the entire function expression. Fixes bug #72264.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72264
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Cc: "10.0" <mesa-stable@lists.freedesktop.org>
src/glsl/ast_function.cpp

index 9dbc0d0f74d3bb0313f3de83623cc9f2db55f362..605ab8c297e96c2b46df08cea10615d6a737016b 100644 (file)
@@ -1656,7 +1656,7 @@ ast_function_expression::hir(exec_list *instructions,
    } else {
       const ast_expression *id = subexpressions[0];
       const char *func_name = id->primary_expression.identifier;
-      YYLTYPE loc = id->get_location();
+      YYLTYPE loc = get_location();
       exec_list actual_parameters;
 
       process_parameters(instructions, &actual_parameters, &this->expressions,