Skip to content

Remove namespace_baset::follow(typet) #8590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/util/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ table, looking up the target symbol name in each successive table until one is
found. Note class \ref multi_namespacet can layer arbitrary numbers of symbol
tables, while for historical reasons \ref namespacet can layer up to two.

The namespace wrapper class also provides the \ref namespacet::follow
The namespace wrapper class also provides the \ref namespacet::follow_tag
operation, which dereferences a `tag_typet` to retrieve the type it refers
to, including following a type tag which refers to another symbol which
eventually refers to a 'real' type.
Expand Down
14 changes: 0 additions & 14 deletions src/util/namespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,6 @@ const symbolt &namespace_baset::lookup(const tag_typet &type) const
return lookup(type.get_identifier());
}

/// Resolve type symbol to the type it points to.
/// \param src: The type we want to resolve in the symbol table.
/// \return The resolved type.
const typet &namespace_baset::follow(const typet &src) const
{
if(src.id() == ID_union_tag)
return follow_tag(to_union_tag_type(src));

if(src.id() == ID_struct_tag)
return follow_tag(to_struct_tag_type(src));

return src;
}

/// Follow type tag of union type.
/// \param src: The union tag type to dispatch on.
/// \return The type of the union tag in the symbol table.
Expand Down
3 changes: 0 additions & 3 deletions src/util/namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Author: Daniel Kroening, [email protected]
#ifndef CPROVER_UTIL_NAMESPACE_H
#define CPROVER_UTIL_NAMESPACE_H

#include "deprecate.h"
#include "invariant.h"
#include "irep.h"

Expand Down Expand Up @@ -61,8 +60,6 @@ class namespace_baset
virtual ~namespace_baset();

void follow_macros(exprt &) const;
DEPRECATED(SINCE(2024, 2, 19, "use follow_tag(...) instead"))
const typet &follow(const typet &) const;

const union_typet &follow_tag(const union_tag_typet &) const;
const struct_typet &follow_tag(const struct_tag_typet &) const;
Expand Down
Loading