Skip to content

Commit 9318301

Browse files
committed
Remove namespace_baset::follow(typet)
This method has been deprecated since 19th Feb 2024. There are no uses.
1 parent ba3b018 commit 9318301

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

src/util/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ table, looking up the target symbol name in each successive table until one is
195195
found. Note class \ref multi_namespacet can layer arbitrary numbers of symbol
196196
tables, while for historical reasons \ref namespacet can layer up to two.
197197

198-
The namespace wrapper class also provides the \ref namespacet::follow
198+
The namespace wrapper class also provides the \ref namespacet::follow_tag
199199
operation, which dereferences a `tag_typet` to retrieve the type it refers
200200
to, including following a type tag which refers to another symbol which
201201
eventually refers to a 'real' type.

src/util/namespace.cpp

-14
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,6 @@ const symbolt &namespace_baset::lookup(const tag_typet &type) const
4343
return lookup(type.get_identifier());
4444
}
4545

46-
/// Resolve type symbol to the type it points to.
47-
/// \param src: The type we want to resolve in the symbol table.
48-
/// \return The resolved type.
49-
const typet &namespace_baset::follow(const typet &src) const
50-
{
51-
if(src.id() == ID_union_tag)
52-
return follow_tag(to_union_tag_type(src));
53-
54-
if(src.id() == ID_struct_tag)
55-
return follow_tag(to_struct_tag_type(src));
56-
57-
return src;
58-
}
59-
6046
/// Follow type tag of union type.
6147
/// \param src: The union tag type to dispatch on.
6248
/// \return The type of the union tag in the symbol table.

src/util/namespace.h

-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Author: Daniel Kroening, [email protected]
1010
#ifndef CPROVER_UTIL_NAMESPACE_H
1111
#define CPROVER_UTIL_NAMESPACE_H
1212

13-
#include "deprecate.h"
1413
#include "invariant.h"
1514
#include "irep.h"
1615

@@ -61,8 +60,6 @@ class namespace_baset
6160
virtual ~namespace_baset();
6261

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

6764
const union_typet &follow_tag(const union_tag_typet &) const;
6865
const struct_typet &follow_tag(const struct_tag_typet &) const;

0 commit comments

Comments
 (0)