diff --git a/src/cpp/cpp_static_assert.h b/src/cpp/cpp_static_assert.h index 7641549a37c..1802002d527 100644 --- a/src/cpp/cpp_static_assert.h +++ b/src/cpp/cpp_static_assert.h @@ -17,7 +17,12 @@ Author: Daniel Kroening, kroening@cs.cmu.edu class cpp_static_assertt : public binary_exprt { public: - cpp_static_assertt() : binary_exprt(ID_cpp_static_assert) + cpp_static_assertt(exprt _cond, exprt _description) + : binary_exprt( + std::move(_cond), + ID_cpp_static_assert, + std::move(_description), + typet()) { } diff --git a/src/cpp/parse.cpp b/src/cpp/parse.cpp index b869257466d..28dae749e5a 100644 --- a/src/cpp/parse.cpp +++ b/src/cpp/parse.cpp @@ -920,19 +920,20 @@ bool Parser::rStaticAssert(cpp_static_assertt &cpp_static_assert) if(lex.get_token(tk)!=TOK_STATIC_ASSERT) return false; - cpp_static_assert=cpp_static_assertt(); - set_location(cpp_static_assert, tk); - if(lex.get_token(tk)!='(') return false; - if(!rExpression(cpp_static_assert.cond(), false)) + exprt cond; + + if(!rExpression(cond, false)) return false; if(lex.get_token(tk)!=',') return false; - if(!rExpression(cpp_static_assert.description(), false)) + exprt description; + + if(!rExpression(description, false)) return false; if(lex.get_token(tk)!=')') @@ -941,6 +942,10 @@ bool Parser::rStaticAssert(cpp_static_assertt &cpp_static_assert) if(lex.get_token(tk)!=';') return false; + cpp_static_assert = + cpp_static_assertt(std::move(cond), std::move(description)); + set_location(cpp_static_assert, tk); + return true; } @@ -7505,7 +7510,7 @@ optionalt Parser::rStatement() case TOK_STATIC_ASSERT: { - cpp_static_assertt cpp_static_assert; + cpp_static_assertt cpp_static_assert{nil_exprt(), nil_exprt()}; if(!rStaticAssert(cpp_static_assert)) return {}; diff --git a/src/util/byte_operators.h b/src/util/byte_operators.h index e28e42a52f3..9fbc9f9a5bb 100644 --- a/src/util/byte_operators.h +++ b/src/util/byte_operators.h @@ -28,19 +28,6 @@ Author: Daniel Kroening, kroening@kroening.com class byte_extract_exprt:public binary_exprt { public: - DEPRECATED( - SINCE(2019, 1, 12, "use byte_extract_exprt(id, op, offset, type) instead")) - explicit byte_extract_exprt(irep_idt _id):binary_exprt(_id) - { - } - - DEPRECATED( - SINCE(2019, 1, 12, "use byte_extract_exprt(id, op, offset, type) instead")) - explicit byte_extract_exprt(irep_idt _id, const typet &_type): - binary_exprt(_id, _type) - { - } - byte_extract_exprt( irep_idt _id, const exprt &_op, diff --git a/src/util/mathematical_expr.h b/src/util/mathematical_expr.h index 1f4cb5d2eb0..11fb0fac208 100644 --- a/src/util/mathematical_expr.h +++ b/src/util/mathematical_expr.h @@ -19,11 +19,6 @@ Author: Daniel Kroening, kroening@kroening.com class transt : public ternary_exprt { public: - DEPRECATED(SINCE(2019, 1, 12, "use transt(op0, op1, op2) instead")) - transt() : ternary_exprt(ID_trans) - { - } - transt( const irep_idt &_id, const exprt &_op0, diff --git a/src/util/std_code.h b/src/util/std_code.h index 0a14463ea6f..a3500347910 100644 --- a/src/util/std_code.h +++ b/src/util/std_code.h @@ -748,18 +748,6 @@ code_blockt create_fatal_assertion( class code_ifthenelset:public codet { public: - DEPRECATED(SINCE( - 2018, - 12, - 2, - "use code_ifthenelset(condition, then_code[, else_code]) instead")) - code_ifthenelset():codet(ID_ifthenelse) - { - operands().resize(3); - op1().make_nil(); - op2().make_nil(); - } - /// An if \p condition then \p then_code else \p else_code statement. code_ifthenelset(exprt condition, codet then_code, codet else_code) : codet( @@ -1034,13 +1022,6 @@ inline code_dowhilet &to_code_dowhile(codet &code) class code_fort:public codet { public: - DEPRECATED( - SINCE(2018, 12, 2, "use code_fort(init, cond, iter, body) instead")) - code_fort():codet(ID_for) - { - operands().resize(4); - } - /// A statement describing a for loop with initializer \p _init, loop /// condition \p _cond, increment \p _iter, and body \p _body. code_fort(exprt _init, exprt _cond, exprt _iter, codet _body) @@ -1973,17 +1954,6 @@ inline const side_effect_exprt &to_side_effect_expr(const exprt &expr) class side_effect_expr_nondett:public side_effect_exprt { public: - DEPRECATED(SINCE( - 2018, - 8, - 9, - "use side_effect_expr_nondett(statement, type, loc) instead")) - explicit side_effect_expr_nondett(const typet &_type): - side_effect_exprt(ID_nondet, _type) - { - set_nullable(true); - } - side_effect_expr_nondett(typet _type, source_locationt loc) : side_effect_exprt(ID_nondet, std::move(_type), std::move(loc)) { @@ -2468,12 +2438,6 @@ static inline const code_landingpadt &to_code_landingpad(const codet &code) class code_try_catcht:public codet { public: - DEPRECATED(SINCE(2018, 12, 2, "use code_try_catcht(try_code) instead")) - code_try_catcht():codet(ID_try_catch) - { - operands().resize(1); - } - /// A statement representing try \p _try_code catch ... explicit code_try_catcht(codet _try_code) : codet(ID_try_catch, {std::move(_try_code)}) diff --git a/src/util/std_expr.h b/src/util/std_expr.h index 4417e46922a..fb9e2d302fe 100644 --- a/src/util/std_expr.h +++ b/src/util/std_expr.h @@ -54,14 +54,7 @@ class nullary_exprt : public expr_protectedt class ternary_exprt : public expr_protectedt { public: - // constructors - DEPRECATED( - SINCE(2018, 9, 21, "use ternary_exprt(id, op0, op1, op2, type) instead")) - explicit ternary_exprt(const irep_idt &_id) : expr_protectedt(_id, type()) - { - operands().resize(3); - } - + // constructor ternary_exprt( const irep_idt &_id, exprt _op0, @@ -280,13 +273,6 @@ class unary_exprt : public expr_protectedt { } - DEPRECATED(SINCE(2018, 12, 2, "use unary_exprt(id, op, type) instead")) - unary_exprt(const irep_idt &_id, const typet &_type) - : expr_protectedt(_id, _type) - { - operands().resize(1); - } - unary_exprt(const irep_idt &_id, exprt _op, typet _type) : expr_protectedt(_id, std::move(_type), {std::move(_op)}) { @@ -548,30 +534,10 @@ inline bswap_exprt &to_bswap_expr(exprt &expr) class predicate_exprt : public expr_protectedt { public: - DEPRECATED(SINCE(2018, 12, 2, "use predicate_exprt(id) instead")) - predicate_exprt() : expr_protectedt(irep_idt(), bool_typet()) - { - } - explicit predicate_exprt(const irep_idt &_id) : expr_protectedt(_id, bool_typet()) { } - - DEPRECATED(SINCE(2018, 12, 2, "use unary_predicate_exprt(id, op) instead")) - predicate_exprt(const irep_idt &_id, const exprt &_op) - : expr_protectedt(_id, bool_typet()) - { - add_to_operands(_op); - } - - DEPRECATED( - SINCE(2018, 12, 2, "use binary_predicate_exprt(op1, id, op2) instead")) - predicate_exprt(const irep_idt &_id, const exprt &_op0, const exprt &_op1) - : expr_protectedt(_id, bool_typet()) - { - add_to_operands(_op0, _op1); - } }; /// \brief A base class for expressions that are predicates, @@ -579,17 +545,6 @@ class predicate_exprt : public expr_protectedt class unary_predicate_exprt:public unary_exprt { public: - DEPRECATED(SINCE(2018, 12, 2, "use unary_predicate_exprt(id, op) instead")) - unary_predicate_exprt():unary_exprt(irep_idt(), bool_typet()) - { - } - - DEPRECATED(SINCE(2018, 12, 2, "use unary_predicate_exprt(id, op) instead")) - explicit unary_predicate_exprt(const irep_idt &_id): - unary_exprt(_id, bool_typet()) - { - } - unary_predicate_exprt(const irep_idt &_id, exprt _op) : unary_exprt(_id, std::move(_op), bool_typet()) { @@ -601,11 +556,6 @@ class unary_predicate_exprt:public unary_exprt class sign_exprt:public unary_predicate_exprt { public: - DEPRECATED(SINCE(2018, 12, 2, "use sign_exprt(op) instead")) - sign_exprt() - { - } - explicit sign_exprt(exprt _op) : unary_predicate_exprt(ID_sign, std::move(_op)) { @@ -650,19 +600,6 @@ inline sign_exprt &to_sign_expr(exprt &expr) class binary_exprt : public expr_protectedt { public: - DEPRECATED(SINCE(2018, 9, 21, "use binary_exprt(lhs, id, rhs) instead")) - explicit binary_exprt(const irep_idt &_id) : expr_protectedt(_id, typet()) - { - operands().resize(2); - } - - DEPRECATED(SINCE(2018, 12, 2, "use binary_exprt(lhs, id, rhs, type) instead")) - binary_exprt(const irep_idt &_id, const typet &_type) - : expr_protectedt(_id, _type) - { - operands().resize(2); - } - binary_exprt(const exprt &_lhs, const irep_idt &_id, exprt _rhs) : expr_protectedt(_id, _lhs.type(), {_lhs, std::move(_rhs)}) { @@ -756,19 +693,6 @@ inline binary_exprt &to_binary_expr(exprt &expr) class binary_predicate_exprt:public binary_exprt { public: - DEPRECATED( - SINCE(2018, 12, 2, "use binary_predicate_exprt(lhs, id, rhs) instead")) - binary_predicate_exprt():binary_exprt(irep_idt(), bool_typet()) - { - } - - DEPRECATED( - SINCE(2018, 12, 2, "use binary_predicate_exprt(lhs, id, rhs) instead")) - explicit binary_predicate_exprt(const irep_idt &_id): - binary_exprt(_id, bool_typet()) - { - } - binary_predicate_exprt(exprt _op0, const irep_idt &_id, exprt _op1) : binary_exprt(std::move(_op0), _id, std::move(_op1), bool_typet()) { @@ -800,19 +724,6 @@ class binary_predicate_exprt:public binary_exprt class binary_relation_exprt:public binary_predicate_exprt { public: - DEPRECATED( - SINCE(2018, 12, 2, "use binary_relation_exprt(lhs, id, rhs) instead")) - binary_relation_exprt() - { - } - - DEPRECATED( - SINCE(2018, 12, 2, "use binary_relation_exprt(lhs, id, rhs) instead")) - explicit binary_relation_exprt(const irep_idt &id): - binary_predicate_exprt(id) - { - } - binary_relation_exprt(exprt _lhs, const irep_idt &_id, exprt _rhs) : binary_predicate_exprt(std::move(_lhs), _id, std::move(_rhs)) { @@ -879,11 +790,6 @@ inline binary_relation_exprt &to_binary_relation_expr(exprt &expr) class multi_ary_exprt : public expr_protectedt { public: - DEPRECATED(SINCE(2018, 9, 21, "use multi_ary_exprt(id, op, type) instead")) - explicit multi_ary_exprt(const irep_idt &_id) : expr_protectedt(_id, typet()) - { - } - DEPRECATED(SINCE(2018, 12, 7, "use multi_ary_exprt(id, op, type) instead")) multi_ary_exprt(const irep_idt &_id, const typet &_type) : expr_protectedt(_id, _type) @@ -980,11 +886,6 @@ inline multi_ary_exprt &to_multi_ary_expr(exprt &expr) class plus_exprt:public multi_ary_exprt { public: - DEPRECATED(SINCE(2019, 1, 12, "use plus_exprt(lhs, rhs, type) instead")) - plus_exprt(const typet &type) : multi_ary_exprt(ID_plus, type) - { - } - plus_exprt(exprt _lhs, exprt _rhs) : multi_ary_exprt(std::move(_lhs), ID_plus, std::move(_rhs)) { @@ -1588,12 +1489,6 @@ inline array_exprt &to_array_expr(exprt &expr) class array_list_exprt : public multi_ary_exprt { public: - DEPRECATED(SINCE(2019, 1, 12, "use array_list_exprt(operands, type) instead")) - explicit array_list_exprt(const array_typet &_type) - : multi_ary_exprt(ID_array_list, _type) - { - } - array_list_exprt(operandst _operands, array_typet _type) : multi_ary_exprt(ID_array_list, std::move(_operands), std::move(_type)) { @@ -1647,12 +1542,6 @@ inline array_list_exprt &to_array_list_expr(exprt &expr) class vector_exprt : public multi_ary_exprt { public: - DEPRECATED(SINCE(2019, 1, 12, "use vector_exprt(operands, type) instead")) - explicit vector_exprt(const vector_typet &_type) - : multi_ary_exprt(ID_vector, _type) - { - } - vector_exprt(operandst _operands, vector_typet _type) : multi_ary_exprt(ID_vector, std::move(_operands), std::move(_type)) { @@ -2117,7 +2006,9 @@ inline dynamic_object_exprt &to_dynamic_object_expr(exprt &expr) class is_dynamic_object_exprt : public unary_predicate_exprt { public: - is_dynamic_object_exprt() : unary_predicate_exprt(ID_is_dynamic_object) + DEPRECATED(SINCE(2019, 11, 8, "use is_dynamic_object(op) instead")) + is_dynamic_object_exprt() + : unary_predicate_exprt(ID_is_dynamic_object, exprt()) { } @@ -2274,11 +2165,6 @@ inline floatbv_typecast_exprt &to_floatbv_typecast_expr(exprt &expr) class and_exprt:public multi_ary_exprt { public: - DEPRECATED(SINCE(2019, 1, 12, "use and_exprt(op, op) instead")) - and_exprt():multi_ary_exprt(ID_and, bool_typet()) - { - } - and_exprt(exprt op0, exprt op1) : multi_ary_exprt(std::move(op0), ID_and, std::move(op1), bool_typet()) { @@ -2387,11 +2273,6 @@ inline implies_exprt &to_implies_expr(exprt &expr) class or_exprt:public multi_ary_exprt { public: - DEPRECATED(SINCE(2019, 1, 12, "use or_exprt(op, op) instead")) - or_exprt():multi_ary_exprt(ID_or, bool_typet()) - { - } - or_exprt(exprt op0, exprt op1) : multi_ary_exprt(std::move(op0), ID_or, std::move(op1), bool_typet()) { @@ -2455,11 +2336,6 @@ inline or_exprt &to_or_expr(exprt &expr) class xor_exprt:public multi_ary_exprt { public: - DEPRECATED(SINCE(2019, 1, 12, "use xor_exprt(op, op) instead")) - xor_exprt():multi_ary_exprt(ID_bitxor, bool_typet()) - { - } - xor_exprt(exprt _op0, exprt _op1) : multi_ary_exprt(std::move(_op0), ID_xor, std::move(_op1), bool_typet()) { @@ -2999,11 +2875,6 @@ class not_exprt:public unary_exprt { PRECONDITION(as_const(*this).op().type().id() == ID_bool); } - - DEPRECATED(SINCE(2019, 1, 12, "use not_exprt(op) instead")) - not_exprt():unary_exprt(ID_not, bool_typet()) - { - } }; template <> @@ -3670,11 +3541,6 @@ class isnan_exprt:public unary_predicate_exprt : unary_predicate_exprt(ID_isnan, std::move(op)) { } - - DEPRECATED(SINCE(2018, 12, 2, "use isnan_exprt(op) instead")) - isnan_exprt():unary_predicate_exprt(ID_isnan) - { - } }; template <> @@ -3720,11 +3586,6 @@ class isinf_exprt:public unary_predicate_exprt : unary_predicate_exprt(ID_isinf, std::move(op)) { } - - DEPRECATED(SINCE(2018, 12, 2, "use isinf_exprt(op) instead")) - isinf_exprt():unary_predicate_exprt(ID_isinf) - { - } }; template <> @@ -3770,11 +3631,6 @@ class isfinite_exprt:public unary_predicate_exprt : unary_predicate_exprt(ID_isfinite, std::move(op)) { } - - DEPRECATED(SINCE(2018, 12, 2, "use isfinite_exprt(op) instead")) - isfinite_exprt():unary_predicate_exprt(ID_isfinite) - { - } }; template <> @@ -3820,11 +3676,6 @@ class isnormal_exprt:public unary_predicate_exprt : unary_predicate_exprt(ID_isnormal, std::move(op)) { } - - DEPRECATED(SINCE(2018, 12, 2, "use isnormal_exprt(op) instead")) - isnormal_exprt():unary_predicate_exprt(ID_isnormal) - { - } }; template <> @@ -3866,11 +3717,6 @@ inline isnormal_exprt &to_isnormal_expr(exprt &expr) class ieee_float_equal_exprt:public binary_relation_exprt { public: - DEPRECATED(SINCE(2018, 12, 2, "use ieee_float_equal_exprt(lhs, rhs) instead")) - ieee_float_equal_exprt():binary_relation_exprt(ID_ieee_float_equal) - { - } - ieee_float_equal_exprt(exprt _lhs, exprt _rhs) : binary_relation_exprt( std::move(_lhs), @@ -3920,13 +3766,6 @@ inline ieee_float_equal_exprt &to_ieee_float_equal_expr(exprt &expr) class ieee_float_notequal_exprt:public binary_relation_exprt { public: - DEPRECATED( - SINCE(2018, 12, 2, "use ieee_float_notequal_exprt(lhs, rhs) instead")) - ieee_float_notequal_exprt(): - binary_relation_exprt(ID_ieee_float_notequal) - { - } - ieee_float_notequal_exprt(exprt _lhs, exprt _rhs) : binary_relation_exprt( std::move(_lhs), @@ -4548,11 +4387,6 @@ inline popcount_exprt &to_popcount_expr(exprt &expr) class cond_exprt : public multi_ary_exprt { public: - DEPRECATED(SINCE(2019, 1, 12, "use cond_exprt(operands, type) instead")) - explicit cond_exprt(const typet &_type) : multi_ary_exprt(ID_cond, _type) - { - } - cond_exprt(operandst _operands, typet _type) : multi_ary_exprt(ID_cond, std::move(_operands), std::move(_type)) { diff --git a/src/util/std_types.h b/src/util/std_types.h index 2d1ee0a0821..62e64c33a4b 100644 --- a/src/util/std_types.h +++ b/src/util/std_types.h @@ -1789,11 +1789,6 @@ inline vector_typet &to_vector_type(typet &type) class complex_typet:public type_with_subtypet { public: - DEPRECATED(SINCE(2018, 12, 2, "use complex_typet(type) instead")) - complex_typet():type_with_subtypet(ID_complex) - { - } - explicit complex_typet(typet _subtype) : type_with_subtypet(ID_complex, std::move(_subtype)) { diff --git a/src/util/type.h b/src/util/type.h index 7f38fc5a335..7107b10eb0d 100644 --- a/src/util/type.h +++ b/src/util/type.h @@ -145,9 +145,6 @@ class typet:public irept class type_with_subtypet:public typet { public: - DEPRECATED(SINCE(2018, 12, 2, "use type_with_subtypet(id, subtype) instead")) - explicit type_with_subtypet(const irep_idt &_id):typet(_id) { } - type_with_subtypet(irep_idt _id, typet _subtype) : typet(std::move(_id), std::move(_subtype)) { @@ -180,14 +177,6 @@ class type_with_subtypest:public typet public: typedef std::vector subtypest; - DEPRECATED( - SINCE(2018, 12, 2, "use type_with_subtypest(id, subtypes) instead")) - type_with_subtypest() { } - - DEPRECATED( - SINCE(2018, 12, 2, "use type_with_subtypest(id, subtypes) instead")) - explicit type_with_subtypest(const irep_idt &_id):typet(_id) { } - type_with_subtypest(const irep_idt &_id, const subtypest &_subtypes) : typet(_id) {