diagnostics: keep the fixits

Introduce proper support for fixits, instead of just printing them on
demand.

* bootstrap.conf: We need gnulib's xlists.
* src/fixits.h, src/fixits.c: New.
* src/complain.c (deprecated_directive): Use fixits_register.
* src/main.c (main): Use fixits_free.
This commit is contained in:
Akim Demaille
2019-01-12 18:22:41 +01:00
parent dad14ec3e4
commit ffe2e4aaec
7 changed files with 177 additions and 47 deletions

View File

@@ -35,6 +35,7 @@
#include "conflicts.h"
#include "derives.h"
#include "files.h"
#include "fixits.h"
#include "getargs.h"
#include "gram.h"
#include "lalr.h"
@@ -205,6 +206,7 @@ main (int argc, char *argv[])
conflicts_free ();
grammar_free ();
output_file_names_free ();
fixits_free ();
/* The scanner memory cannot be released right after parsing, as it
contains things such as user actions, prologue, epilogue etc. */