fixits: handle %file-prefix

* src/files.h, src/files.c (spec_file_prefix_loc): New.
* src/scan-gram.l (%file-prefix): Delegate diagnostics to...
* src/parse-gram.y (handle_file_prefix): here.
* src/complain.c (duplicate_directive): Quote the directive.
* tests/input.at: Adjust.
This commit is contained in:
Akim Demaille
2019-01-17 06:43:28 +01:00
parent 5879c8dc5a
commit e86adac52d
7 changed files with 51 additions and 16 deletions

View File

@@ -407,7 +407,7 @@ duplicate_directive (char const *directive,
if (feature_flag & feature_caret)
complain_indent (&second, Wother, &i, _("duplicate directive"));
else
complain_indent (&second, Wother, &i, _("duplicate directive: %s"), directive);
complain_indent (&second, Wother, &i, _("duplicate directive: %s"), quote (directive));
i += SUB_INDENT;
complain_indent (&first, Wother, &i, _("previous declaration"));
fixits_register (&second, "");