diagnostics: use grammar_file instead of current_file

Currently there are two globals denoting the input file: grammar_file
is the one from the command line, and current_file which might change
because of #line.  Use only the former.

* src/complain.c (error_message): here.
* tests/diagnostics.at: Adjust.
This commit is contained in:
Akim Demaille
2019-10-22 09:01:19 +02:00
parent 6e7d8ba6a7
commit 4b4e532748
2 changed files with 2 additions and 2 deletions

View File

@@ -229,7 +229,7 @@ b: {}
| <fixit-insert>%empty</fixit-insert>
/dev/stdout:1.4-5: <warning>warning:</warning> empty rule without %empty [<warning>-Wempty-rule</warning>]
| <fixit-insert>%empty</fixit-insert>
/dev/stdout: <warning>warning:</warning> fix-its can be applied. Rerun with option '--update'. [<warning>-Wother</warning>]
input.y: <warning>warning:</warning> fix-its can be applied. Rerun with option '--update'. [<warning>-Wother</warning>]
]])