Skip to content

Commit 13bae95

Browse files
author
Daniel Kroening
authored
Merge pull request #5180 from diffblue/remove-deprecated
Remove deprecated constructors
2 parents 077b5ee + 9a0f3b3 commit 13bae95

File tree

8 files changed

+21
-247
lines changed

8 files changed

+21
-247
lines changed

src/cpp/cpp_static_assert.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ Author: Daniel Kroening, [email protected]
1717
class cpp_static_assertt : public binary_exprt
1818
{
1919
public:
20-
cpp_static_assertt() : binary_exprt(ID_cpp_static_assert)
20+
cpp_static_assertt(exprt _cond, exprt _description)
21+
: binary_exprt(
22+
std::move(_cond),
23+
ID_cpp_static_assert,
24+
std::move(_description),
25+
typet())
2126
{
2227
}
2328

src/cpp/parse.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -920,19 +920,20 @@ bool Parser::rStaticAssert(cpp_static_assertt &cpp_static_assert)
920920
if(lex.get_token(tk)!=TOK_STATIC_ASSERT)
921921
return false;
922922

923-
cpp_static_assert=cpp_static_assertt();
924-
set_location(cpp_static_assert, tk);
925-
926923
if(lex.get_token(tk)!='(')
927924
return false;
928925

929-
if(!rExpression(cpp_static_assert.cond(), false))
926+
exprt cond;
927+
928+
if(!rExpression(cond, false))
930929
return false;
931930

932931
if(lex.get_token(tk)!=',')
933932
return false;
934933

935-
if(!rExpression(cpp_static_assert.description(), false))
934+
exprt description;
935+
936+
if(!rExpression(description, false))
936937
return false;
937938

938939
if(lex.get_token(tk)!=')')
@@ -941,6 +942,10 @@ bool Parser::rStaticAssert(cpp_static_assertt &cpp_static_assert)
941942
if(lex.get_token(tk)!=';')
942943
return false;
943944

945+
cpp_static_assert =
946+
cpp_static_assertt(std::move(cond), std::move(description));
947+
set_location(cpp_static_assert, tk);
948+
944949
return true;
945950
}
946951

@@ -7505,7 +7510,7 @@ optionalt<codet> Parser::rStatement()
75057510

75067511
case TOK_STATIC_ASSERT:
75077512
{
7508-
cpp_static_assertt cpp_static_assert;
7513+
cpp_static_assertt cpp_static_assert{nil_exprt(), nil_exprt()};
75097514

75107515
if(!rStaticAssert(cpp_static_assert))
75117516
return {};

src/util/byte_operators.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,6 @@ Author: Daniel Kroening, [email protected]
2828
class byte_extract_exprt:public binary_exprt
2929
{
3030
public:
31-
DEPRECATED(
32-
SINCE(2019, 1, 12, "use byte_extract_exprt(id, op, offset, type) instead"))
33-
explicit byte_extract_exprt(irep_idt _id):binary_exprt(_id)
34-
{
35-
}
36-
37-
DEPRECATED(
38-
SINCE(2019, 1, 12, "use byte_extract_exprt(id, op, offset, type) instead"))
39-
explicit byte_extract_exprt(irep_idt _id, const typet &_type):
40-
binary_exprt(_id, _type)
41-
{
42-
}
43-
4431
byte_extract_exprt(
4532
irep_idt _id,
4633
const exprt &_op,

src/util/mathematical_expr.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ Author: Daniel Kroening, [email protected]
1919
class transt : public ternary_exprt
2020
{
2121
public:
22-
DEPRECATED(SINCE(2019, 1, 12, "use transt(op0, op1, op2) instead"))
23-
transt() : ternary_exprt(ID_trans)
24-
{
25-
}
26-
2722
transt(
2823
const irep_idt &_id,
2924
const exprt &_op0,

src/util/std_code.h

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -748,18 +748,6 @@ code_blockt create_fatal_assertion(
748748
class code_ifthenelset:public codet
749749
{
750750
public:
751-
DEPRECATED(SINCE(
752-
2018,
753-
12,
754-
2,
755-
"use code_ifthenelset(condition, then_code[, else_code]) instead"))
756-
code_ifthenelset():codet(ID_ifthenelse)
757-
{
758-
operands().resize(3);
759-
op1().make_nil();
760-
op2().make_nil();
761-
}
762-
763751
/// An if \p condition then \p then_code else \p else_code statement.
764752
code_ifthenelset(exprt condition, codet then_code, codet else_code)
765753
: codet(
@@ -1034,13 +1022,6 @@ inline code_dowhilet &to_code_dowhile(codet &code)
10341022
class code_fort:public codet
10351023
{
10361024
public:
1037-
DEPRECATED(
1038-
SINCE(2018, 12, 2, "use code_fort(init, cond, iter, body) instead"))
1039-
code_fort():codet(ID_for)
1040-
{
1041-
operands().resize(4);
1042-
}
1043-
10441025
/// A statement describing a for loop with initializer \p _init, loop
10451026
/// condition \p _cond, increment \p _iter, and body \p _body.
10461027
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)
19731954
class side_effect_expr_nondett:public side_effect_exprt
19741955
{
19751956
public:
1976-
DEPRECATED(SINCE(
1977-
2018,
1978-
8,
1979-
9,
1980-
"use side_effect_expr_nondett(statement, type, loc) instead"))
1981-
explicit side_effect_expr_nondett(const typet &_type):
1982-
side_effect_exprt(ID_nondet, _type)
1983-
{
1984-
set_nullable(true);
1985-
}
1986-
19871957
side_effect_expr_nondett(typet _type, source_locationt loc)
19881958
: side_effect_exprt(ID_nondet, std::move(_type), std::move(loc))
19891959
{
@@ -2468,12 +2438,6 @@ static inline const code_landingpadt &to_code_landingpad(const codet &code)
24682438
class code_try_catcht:public codet
24692439
{
24702440
public:
2471-
DEPRECATED(SINCE(2018, 12, 2, "use code_try_catcht(try_code) instead"))
2472-
code_try_catcht():codet(ID_try_catch)
2473-
{
2474-
operands().resize(1);
2475-
}
2476-
24772441
/// A statement representing try \p _try_code catch ...
24782442
explicit code_try_catcht(codet _try_code)
24792443
: codet(ID_try_catch, {std::move(_try_code)})

0 commit comments

Comments
 (0)