From e558272892d2862f23ed1ac6dda729cf720d0c4f Mon Sep 17 00:00:00 2001 From: svorenova Date: Wed, 22 Aug 2018 11:32:16 +0100 Subject: [PATCH 1/2] Make sure incomplete array uses the correct id --- src/util/std_types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/std_types.h b/src/util/std_types.h index 65df782c18f..7858624d5ff 100644 --- a/src/util/std_types.h +++ b/src/util/std_types.h @@ -1051,8 +1051,8 @@ class incomplete_array_typet:public type_with_subtypet { } - explicit incomplete_array_typet(const typet &_subtype): - type_with_subtypet(ID_array, _subtype) + explicit incomplete_array_typet(const typet &_subtype) + : type_with_subtypet(ID_incomplete_array, _subtype) { } }; @@ -1063,7 +1063,7 @@ class incomplete_array_typet:public type_with_subtypet template <> inline bool can_cast_type(const typet &type) { - return type.id() == ID_array; + return type.id() == ID_incomplete_array; } /// \brief Cast a typet to an \ref incomplete_array_typet From ff5a2320e127c2c01d22469f395f53757bd880b1 Mon Sep 17 00:00:00 2001 From: svorenova Date: Tue, 11 Sep 2018 17:42:12 +0100 Subject: [PATCH 2/2] Remove unused constructor --- src/util/std_types.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/util/std_types.h b/src/util/std_types.h index 7858624d5ff..79aa8d05aa1 100644 --- a/src/util/std_types.h +++ b/src/util/std_types.h @@ -1050,11 +1050,6 @@ class incomplete_array_typet:public type_with_subtypet incomplete_array_typet():type_with_subtypet(ID_incomplete_array) { } - - explicit incomplete_array_typet(const typet &_subtype) - : type_with_subtypet(ID_incomplete_array, _subtype) - { - } }; /// Check whether a reference to a typet is a \ref incomplete_array_typet.