Skip to content

Commit 5d0d00a

Browse files
author
Daniel Kroening
committed
remove vector_typet() constructor, which produces an incomplete object
1 parent 1daac02 commit 5d0d00a

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/ansi-c/ansi_c_convert_type.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -601,10 +601,8 @@ void ansi_c_convert_typet::write(typet &type)
601601

602602
if(vector_size.is_not_nil())
603603
{
604-
vector_typet new_type;
605-
new_type.size()=vector_size;
604+
vector_typet new_type(type, vector_size);
606605
new_type.add_source_location()=vector_size.source_location();
607-
new_type.subtype().swap(type);
608606
type=new_type;
609607
}
610608

src/util/std_types.h

-4
Original file line numberDiff line numberDiff line change
@@ -1597,10 +1597,6 @@ inline const range_typet &to_range_type(const typet &type)
15971597
class vector_typet:public type_with_subtypet
15981598
{
15991599
public:
1600-
vector_typet():type_with_subtypet(ID_vector)
1601-
{
1602-
}
1603-
16041600
vector_typet(
16051601
const typet &_subtype,
16061602
const exprt &_size):type_with_subtypet(ID_vector, _subtype)

0 commit comments

Comments
 (0)