mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
diagnostics: add fixit support for duplicate removal
* src/muscle-tab.c (muscle_percent_define_insert): Register a fixit for duplicate removal. * tests/input.at: Adjust expectations.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "complain.h"
|
||||
#include "files.h"
|
||||
#include "fixits.h"
|
||||
#include "getargs.h"
|
||||
#include "muscle-tab.h"
|
||||
#include "quote.h"
|
||||
@@ -532,6 +533,7 @@ muscle_percent_define_insert (char const *var, location variable_loc,
|
||||
i += SUB_INDENT;
|
||||
location loc = muscle_percent_define_get_loc (variable);
|
||||
complain_indent (&loc, complaint, &i, _("previous definition"));
|
||||
fixits_register (&variable_loc, "");
|
||||
warned = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user