Skip to content

Commit f573d97

Browse files
tautschnigDaniel Kroening
authored and
Daniel Kroening
committed
The type of statements is empty_typet()
Do not re-use code_typet, which is the type of methods/procedures.
1 parent ed099bb commit f573d97

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ansi-c/c_typecheck_code.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void c_typecheck_baset::typecheck_code(codet &code)
3030
throw 0;
3131
}
3232

33-
code.type()=code_typet();
33+
code.type() = empty_typet();
3434

3535
const irep_idt &statement=code.get_statement();
3636

src/util/std_code.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Author: Daniel Kroening, [email protected]
1717
#include "expr_cast.h"
1818
#include "invariant.h"
1919
#include "std_expr.h"
20+
#include "std_types.h"
2021
#include "validate.h"
2122
#include "validate_code.h"
2223

@@ -35,15 +36,14 @@ class codet:public exprt
3536
{
3637
public:
3738
DEPRECATED("use codet(statement) instead")
38-
codet():exprt(ID_code, typet(ID_code))
39+
codet() : exprt(ID_code, empty_typet())
3940
{
4041
}
4142

4243
/// \param statement: Specifies the type of the `codet` to be constructed,
4344
/// e.g. `ID_block` for a \ref code_blockt or `ID_assign` for a
4445
/// \ref code_assignt.
45-
explicit codet(const irep_idt &statement):
46-
exprt(ID_code, typet(ID_code))
46+
explicit codet(const irep_idt &statement) : exprt(ID_code, empty_typet())
4747
{
4848
set_statement(statement);
4949
}

0 commit comments

Comments
 (0)