mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
glsl/glcpp: Fix off-by-one error in column in first-line error messages
For the first line we were initializing the column to 1, but for all subsequent lines we were initializing the column to 0. The column number is advanced for each token read before any error message is printed. So the 0 value is the correct initialization, (so that the first column is reported as column 1). With this extremely minor change, many of the .expected files are updated such that error messages for the first line now have the correct column number in them. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
0742e0acd3
commit
8e8f8ff1b2
17 changed files with 19 additions and 19 deletions
|
|
@ -57,7 +57,7 @@ void glcpp_set_column (int column_no , yyscan_t yyscanner);
|
|||
#define YY_USER_INIT \
|
||||
do { \
|
||||
yylineno = 1; \
|
||||
yycolumn = 1; \
|
||||
yycolumn = 0; \
|
||||
yylloc->source = 0; \
|
||||
} while(0)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
0:1(2): preprocessor error: #else without #if
|
||||
0:1(1): preprocessor error: #else without #if
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
0:1(2): preprocessor error: #elif without #if
|
||||
0:1(1): preprocessor error: #elif without #if
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
0:1(2): preprocessor error: #endif without #if
|
||||
0:1(1): preprocessor error: #endif without #if
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
0:1(7): preprocessor error: Unterminated #if
|
||||
0:1(6): preprocessor error: Unterminated #if
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
0:1(10): preprocessor warning: Macro names containing "__" are reserved for use by the implementation.
|
||||
0:1(9): preprocessor warning: Macro names containing "__" are reserved for use by the implementation.
|
||||
|
||||
0:2(9): preprocessor error: Macro names starting with "GL_" are reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
0:1(2): preprocessor error: #error human error
|
||||
0:1(1): preprocessor error: #error human error
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
0:1(13): preprocessor error: division by 0 in preprocessor directive
|
||||
0:1(12): preprocessor error: division by 0 in preprocessor directive
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
0:2(7): preprocessor error: syntax error, unexpected IDENTIFIER, expecting NEWLINE
|
||||
0:1(7): preprocessor error: Unterminated #if
|
||||
0:1(6): preprocessor error: Unterminated #if
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
0:1(3): preprocessor error: Invalid tokens after #
|
||||
0:1(2): preprocessor error: Invalid tokens after #
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
0:1(3): preprocessor error: Invalid tokens after #
|
||||
0:1(2): preprocessor error: Invalid tokens after #
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
0:1(2): preprocessor error: Built-in (pre-defined) macro names can not be undefined.
|
||||
0:1(1): preprocessor error: Built-in (pre-defined) macro names can not be undefined.
|
||||
0:2(1): preprocessor error: Built-in (pre-defined) macro names can not be undefined.
|
||||
0:3(1): preprocessor error: Built-in (pre-defined) macro names can not be undefined.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
0:2(7): preprocessor error: syntax error, unexpected IDENTIFIER, expecting NEWLINE
|
||||
0:1(7): preprocessor error: Unterminated #if
|
||||
0:1(6): preprocessor error: Unterminated #if
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
0:1(15): preprocessor error: extra tokens at end of directive
|
||||
0:1(14): preprocessor error: extra tokens at end of directive
|
||||
0:4(14): preprocessor error: extra tokens at end of directive
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
0:1(10): preprocessor error: #define followed by a non-identifier: 123
|
||||
0:1(10): preprocessor error: syntax error, unexpected INTEGER_STRING, expecting FUNC_IDENTIFIER or OBJ_IDENTIFIER
|
||||
0:1(9): preprocessor error: #define followed by a non-identifier: 123
|
||||
0:1(9): preprocessor error: syntax error, unexpected INTEGER_STRING, expecting FUNC_IDENTIFIER or OBJ_IDENTIFIER
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
0:1(2): preprocessor error: #define without macro name
|
||||
0:1(2): preprocessor error: syntax error, unexpected NEWLINE, expecting FUNC_IDENTIFIER or OBJ_IDENTIFIER
|
||||
0:1(1): preprocessor error: #define without macro name
|
||||
0:1(1): preprocessor error: syntax error, unexpected NEWLINE, expecting FUNC_IDENTIFIER or OBJ_IDENTIFIER
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
0:1(52): preprocessor error: Unterminated comment
|
||||
0:1(51): preprocessor error: Unterminated comment
|
||||
This file ends with no newline within a comment
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue