diff --git a/src/cpp/cpp_convert_type.cpp b/src/cpp/cpp_convert_type.cpp index f11d06a379f..ee70524ff15 100644 --- a/src/cpp/cpp_convert_type.cpp +++ b/src/cpp/cpp_convert_type.cpp @@ -589,8 +589,7 @@ void cpp_convert_plain_type(typet &type) type.id() == ID_union || type.id() == ID_array || type.id() == ID_code || type.id() == ID_unsignedbv || type.id() == ID_signedbv || type.id() == ID_bool || type.id() == ID_floatbv || type.id() == ID_empty || - type.id() == ID_symbol_type || type.id() == ID_constructor || - type.id() == ID_destructor) + type.id() == ID_constructor || type.id() == ID_destructor) { } else if(type.id()==ID_c_enum) diff --git a/src/cpp/cpp_declarator_converter.cpp b/src/cpp/cpp_declarator_converter.cpp index 632d56e70b6..4e0c135bc47 100644 --- a/src/cpp/cpp_declarator_converter.cpp +++ b/src/cpp/cpp_declarator_converter.cpp @@ -142,9 +142,7 @@ symbolt &cpp_declarator_convertert::convert( cpp_typecheck_resolvet::wantt::TYPE, cpp_typecheck_fargst()); - if( - symbol_expr.id() != ID_type || - symbol_expr.type().id() != ID_symbol_type) + if(symbol_expr.id() != ID_type) { cpp_typecheck.error().source_location=name.source_location(); cpp_typecheck.error() << "error: expected type" diff --git a/src/cpp/cpp_exception_id.cpp b/src/cpp/cpp_exception_id.cpp index 74ade5396fd..2450665753f 100644 --- a/src/cpp/cpp_exception_id.cpp +++ b/src/cpp/cpp_exception_id.cpp @@ -21,11 +21,7 @@ void cpp_exception_list_rec( const std::string &suffix, std::vector &dest) { - if(src.id() == ID_symbol_type) - { - cpp_exception_list_rec(ns.follow(src), ns, suffix, dest); - } - else if(src.id()==ID_pointer) + if(src.id() == ID_pointer) { if(src.get_bool(ID_C_reference)) { diff --git a/src/cpp/cpp_instantiate_template.cpp b/src/cpp/cpp_instantiate_template.cpp index d4bc86e1396..20d4fae67cc 100644 --- a/src/cpp/cpp_instantiate_template.cpp +++ b/src/cpp/cpp_instantiate_template.cpp @@ -46,10 +46,7 @@ std::string cpp_typecheckt::template_suffix( if(expr.id()==ID_type) { const typet &type=expr.type(); - if(type.id() == ID_symbol_type) - result += id2string(to_symbol_type(type).get_identifier()); - else if(type.id() == ID_struct_tag || - type.id() == ID_union_tag) + if(type.id() == ID_struct_tag || type.id() == ID_union_tag) result += id2string(to_tag_type(type).get_identifier()); else result+=cpp_type2name(type); diff --git a/src/cpp/cpp_is_pod.cpp b/src/cpp/cpp_is_pod.cpp index 8803c6bf4cd..7b53a520b7b 100644 --- a/src/cpp/cpp_is_pod.cpp +++ b/src/cpp/cpp_is_pod.cpp @@ -79,12 +79,6 @@ bool cpp_typecheckt::cpp_is_pod(const typet &type) const // but pointers are PODs! return true; } - else if(type.id() == ID_symbol_type) - { - const symbolt &symb = lookup(to_symbol_type(type)); - DATA_INVARIANT(symb.is_type, "type symbol is a type"); - return cpp_is_pod(symb.type); - } else if(type.id() == ID_struct_tag || type.id() == ID_union_tag) { diff --git a/src/cpp/cpp_typecheck_bases.cpp b/src/cpp/cpp_typecheck_bases.cpp index 5ffde029cea..c0cb37e4d8c 100644 --- a/src/cpp/cpp_typecheck_bases.cpp +++ b/src/cpp/cpp_typecheck_bases.cpp @@ -43,9 +43,6 @@ void cpp_typecheckt::typecheck_compound_bases(struct_typet &type) // elaborate any class template instances given as bases elaborate_class_template(base_symbol_expr.type()); - if(base_symbol_expr.type().id() == ID_symbol_type) - base_symbol_expr.type().id(ID_struct_tag); - if(base_symbol_expr.type().id() != ID_struct_tag) { error().source_location=name.source_location(); diff --git a/src/cpp/cpp_typecheck_resolve.cpp b/src/cpp/cpp_typecheck_resolve.cpp index 935a9b2bbdf..3b8ad2f7071 100644 --- a/src/cpp/cpp_typecheck_resolve.cpp +++ b/src/cpp/cpp_typecheck_resolve.cpp @@ -160,8 +160,6 @@ void cpp_typecheck_resolvet::remove_duplicates( if(old_id.id() == ID_symbol) id = to_symbol_expr(old_id).get_identifier(); - else if(old_id.id() == ID_type && old_id.type().id() == ID_symbol_type) - id = to_symbol_type(old_id.type()).get_identifier(); else if(old_id.id() == ID_type && old_id.type().id() == ID_struct_tag) id = to_struct_tag_type(old_id.type()).get_identifier(); else if(old_id.id() == ID_type && old_id.type().id() == ID_union_tag) @@ -353,20 +351,11 @@ exprt cpp_typecheck_resolvet::convert_identifier( } else { - typet followed_type=symbol.type; - bool constant=followed_type.get_bool(ID_C_constant); + bool constant = symbol.type.get_bool(ID_C_constant); - while(followed_type.id() == ID_symbol_type) - { - followed_type = - cpp_typecheck.follow(to_symbol_type(followed_type)); - constant |= followed_type.get_bool(ID_C_constant); - } - - if(constant && - symbol.value.is_not_nil() && - is_number(followed_type) && - symbol.value.id() == ID_constant) + if( + constant && symbol.value.is_not_nil() && is_number(symbol.type) && + symbol.value.id() == ID_constant) { e=symbol.value; } diff --git a/src/cpp/cpp_typecheck_type.cpp b/src/cpp/cpp_typecheck_type.cpp index a3a3aa3b265..b92c9108a03 100644 --- a/src/cpp/cpp_typecheck_type.cpp +++ b/src/cpp/cpp_typecheck_type.cpp @@ -184,9 +184,6 @@ void cpp_typecheckt::typecheck_type(typet &type) type.id() == ID_fixedbv || type.id() == ID_empty) { } - else if(type.id() == ID_symbol_type) - { - } else if(type.id() == ID_struct_tag) { } diff --git a/src/cpp/expr2cpp.cpp b/src/cpp/expr2cpp.cpp index 26f34dfe02b..ffcbc06b241 100644 --- a/src/cpp/expr2cpp.cpp +++ b/src/cpp/expr2cpp.cpp @@ -154,47 +154,6 @@ std::string expr2cppt::convert_rec( else return expr2ct::convert_rec(src, qualifiers, declarator); } - else if(src.id() == ID_symbol_type) - { - const irep_idt &identifier= - to_symbol_type(src).get_identifier(); - - const symbolt &symbol=ns.lookup(identifier); - - if(symbol.type.id() == ID_struct) - { - std::string dest=q; - - if(symbol.type.get_bool(ID_C_class)) - dest+="class"; - else if(symbol.type.get_bool(ID_C_interface)) - dest+="__interface"; // MS-specific - else - dest+="struct"; - - if(!symbol.pretty_name.empty()) - dest+=" "+id2string(symbol.pretty_name); - - dest+=d; - - return dest; - } - else if(symbol.type.id()==ID_c_enum) - { - std::string dest=q; - - dest+="enum"; - - if(!symbol.pretty_name.empty()) - dest+=" "+id2string(symbol.pretty_name); - - dest+=d; - - return dest; - } - else - return expr2ct::convert_rec(src, qualifiers, declarator); - } else if(src.id() == ID_struct) { std::string dest=q;