Skip to content

Commit fd13d3a

Browse files
authored
Merge pull request #8529 from diffblue/multi_ary_constructors
add mulit-ary constructor for xor_exprt, bitxor_exprt, bitand_exprt, …
2 parents e186314 + 923769f commit fd13d3a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/util/bitvector_expr.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ class bitor_exprt : public multi_ary_exprt
128128
: multi_ary_exprt(_op0, ID_bitor, std::move(_op1), _op0.type())
129129
{
130130
}
131+
132+
bitor_exprt(exprt::operandst _operands, typet _type)
133+
: multi_ary_exprt(ID_bitor, std::move(_operands), std::move(_type))
134+
{
135+
}
131136
};
132137

133138
template <>
@@ -163,6 +168,11 @@ class bitxor_exprt : public multi_ary_exprt
163168
: multi_ary_exprt(std::move(_op0), ID_bitxor, std::move(_op1))
164169
{
165170
}
171+
172+
bitxor_exprt(exprt::operandst _operands, typet _type)
173+
: multi_ary_exprt(ID_bitxor, std::move(_operands), std::move(_type))
174+
{
175+
}
166176
};
167177

168178
template <>
@@ -233,6 +243,11 @@ class bitand_exprt : public multi_ary_exprt
233243
: multi_ary_exprt(_op0, ID_bitand, std::move(_op1), _op0.type())
234244
{
235245
}
246+
247+
bitand_exprt(exprt::operandst _operands, typet _type)
248+
: multi_ary_exprt(ID_bitand, std::move(_operands), std::move(_type))
249+
{
250+
}
236251
};
237252

238253
template <>

src/util/std_expr.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,6 +2299,11 @@ class xor_exprt:public multi_ary_exprt
22992299
: multi_ary_exprt(std::move(_op0), ID_xor, std::move(_op1), bool_typet())
23002300
{
23012301
}
2302+
2303+
explicit xor_exprt(exprt::operandst _operands)
2304+
: multi_ary_exprt(ID_xor, std::move(_operands), bool_typet())
2305+
{
2306+
}
23022307
};
23032308

23042309
template <>

0 commit comments

Comments
 (0)