From c33db8219a3e213f61b7beb50ea7c428d08b0db5 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Wed, 20 Dec 2023 09:26:40 +0000 Subject: [PATCH] Permit constructing parsert with a message handler This is to provide a path to remove the long-deprecated messaget() constructor. Uses of this new constructor will be added in separate commits. --- src/util/parser.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util/parser.h b/src/util/parser.h index 70a796ec4a9..c19aeb58977 100644 --- a/src/util/parser.h +++ b/src/util/parser.h @@ -12,6 +12,7 @@ Author: Daniel Kroening, kroening@kroening.com #ifndef CPROVER_UTIL_PARSER_H #define CPROVER_UTIL_PARSER_H +#include "deprecate.h" #include "expr.h" #include "message.h" @@ -39,7 +40,13 @@ class parsert last_line.clear(); } + DEPRECATED(SINCE(2023, 12, 20, "use parsert(message_handler) instead")) parsert():in(nullptr) { clear(); } + explicit parsert(message_handlert &message_handler) + : in(nullptr), log(message_handler) + { + clear(); + } virtual ~parsert() { } // The following are for the benefit of the scanner