From 32910495644e7f6fbf9b3b85ecc16f4e30447e60 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Sun, 4 Sep 2022 19:10:26 +0200 Subject: Export the functions that control warnings Activation and deactivation of a given warning, plus set-as-error and remove-as-error. --- cparser/Diagnostics.mli | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cparser/Diagnostics.mli b/cparser/Diagnostics.mli index 47727707..e7d6fa0f 100644 --- a/cparser/Diagnostics.mli +++ b/cparser/Diagnostics.mli @@ -101,3 +101,16 @@ val error_summary : unit -> unit val active_warning : warning_type -> bool (** Test whether a warning is active to avoid costly checks *) + +val activate_warning : warning_type -> unit -> unit +(** Turn the given warning on *) + +val deactivate_warning : warning_type -> unit -> unit +(** Turn the given warning off *) + +val warning_as_error : warning_type -> unit -> unit +(** Turn the given warning on and report it as an error *) + +val warning_not_as_error : warning_type -> unit -> unit +(** Do not report the given warning as an error *) + -- cgit