CBMC
enum_encoding.h File Reference
#include <util/expr.h>
+ Include dependency graph for enum_encoding.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

exprt lower_enum (exprt expr, const namespacet &ns)
 Function to lower expr and its sub-expressions containing enum types. More...
 

Function Documentation

◆ lower_enum()

exprt lower_enum ( exprt  expr,
const namespacet ns 
)

Function to lower expr and its sub-expressions containing enum types.

Specifically it replaces the node c_enum_tag_typet type with the underlying type of the enum the tag points to.

Parameters
exprthe expression to lower.
nsthe namespace where to lookup c_enum_tag_types.
Returns
the lowered expression.

Definition at line 37 of file enum_encoding.cpp.