Skip to content

Commit f929ec4

Browse files
authored
Merge pull request #5894 from diffblue/pointer_expr_h_fixup
move null_pointer_exprt to pointer_expr.h
2 parents 104ba11 + d93fc47 commit f929ec4

File tree

10 files changed

+24
-16
lines changed

10 files changed

+24
-16
lines changed

jbmc/src/java_bytecode/java_bytecode_internal_additions.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ Author: Daniel Kroening, kroening@kroening.com
1212
#include "java_types.h"
1313
#include "remove_exceptions.h"
1414

15-
#include <util/std_types.h>
16-
#include <util/cprover_prefix.h>
1715
#include <util/c_types.h>
16+
#include <util/cprover_prefix.h>
17+
#include <util/pointer_expr.h>
18+
#include <util/std_types.h>
1819

1920
void java_internal_additions(symbol_table_baset &dest)
2021
{

jbmc/src/java_bytecode/remove_exceptions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ Date: December 2016
2222
#include <algorithm>
2323

2424
#include <util/c_types.h>
25-
#include <util/std_expr.h>
25+
#include <util/pointer_expr.h>
2626
#include <util/std_code.h>
27+
#include <util/std_expr.h>
2728
#include <util/symbol_table.h>
2829

2930
#include <goto-programs/remove_skip.h>

jbmc/unit/java_bytecode/goto-programs/remove_virtual_functions_without_fallback.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ Author: Diffblue Ltd.
1010
#include <java-testing-utils/load_java_class.h>
1111
#include <testing-utils/use_catch.h>
1212

13+
#include <util/pointer_expr.h>
1314
#include <util/simplify_expr.h>
15+
1416
#include <goto-programs/remove_virtual_functions.h>
1517

1618
/// Try to resolve a classid comparison `expr`, assuming that any accessed

scripts/expected_doxygen_warnings.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ warning: Included by graph for 'invariant.h' not generated, too many nodes (187)
9292
warning: Included by graph for 'irep.h' not generated, too many nodes (62), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
9393
warning: Included by graph for 'message.h' not generated, too many nodes (117), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
9494
warning: Included by graph for 'namespace.h' not generated, too many nodes (109), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
95-
warning: Included by graph for 'pointer_expr.h' not generated, too many nodes (101), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
95+
warning: Included by graph for 'pointer_expr.h' not generated, too many nodes (106), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
9696
warning: Included by graph for 'prefix.h' not generated, too many nodes (86), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
9797
warning: Included by graph for 'simplify_expr.h' not generated, too many nodes (77), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.
9898
warning: Included by graph for 'std_code.h' not generated, too many nodes (78), threshold is 60. Consider increasing DOT_GRAPH_MAX_NODES.

src/ansi-c/c_nondet_symbol_factory.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Author: Diffblue Ltd.
1919
#include <util/fresh_symbol.h>
2020
#include <util/namespace.h>
2121
#include <util/nondet_bool.h>
22+
#include <util/pointer_expr.h>
2223
#include <util/std_expr.h>
2324
#include <util/std_types.h>
2425
#include <util/string_constant.h>

src/util/arith_tools.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ Author: Daniel Kroening, kroening@kroening.com
1111
#include "fixedbv.h"
1212
#include "ieee_float.h"
1313
#include "invariant.h"
14-
#include "std_types.h"
14+
#include "pointer_expr.h"
1515
#include "std_expr.h"
16+
#include "std_types.h"
1617

1718
#include <algorithm>
1819

src/util/pointer_expr.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,4 +326,14 @@ inline dereference_exprt &to_dereference_expr(exprt &expr)
326326
return ret;
327327
}
328328

329+
/// \brief The null pointer constant
330+
class null_pointer_exprt : public constant_exprt
331+
{
332+
public:
333+
explicit null_pointer_exprt(pointer_typet type)
334+
: constant_exprt(ID_NULL, std::move(type))
335+
{
336+
}
337+
};
338+
329339
#endif // CPROVER_UTIL_POINTER_EXPR_H

src/util/pointer_predicates.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Author: Daniel Kroening, kroening@kroening.com
1515
#include "c_types.h"
1616
#include "cprover_prefix.h"
1717
#include "namespace.h"
18+
#include "pointer_expr.h"
1819
#include "pointer_offset_size.h"
1920
#include "std_expr.h"
2021
#include "symbol.h"

src/util/std_expr.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2746,17 +2746,6 @@ inline bool can_cast_expr<nil_exprt>(const exprt &base)
27462746
return base.id() == ID_nil;
27472747
}
27482748

2749-
/// \brief The null pointer constant
2750-
class null_pointer_exprt:public constant_exprt
2751-
{
2752-
public:
2753-
explicit null_pointer_exprt(pointer_typet type)
2754-
: constant_exprt(ID_NULL, std::move(type))
2755-
{
2756-
}
2757-
};
2758-
2759-
27602749
/// \brief An expression denoting infinity
27612750
class infinity_exprt : public nullary_exprt
27622751
{

unit/interpreter/interpreter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ Author: Diffblue Ltd.
1010

1111
#include <goto-programs/goto_functions.h>
1212
#include <goto-programs/interpreter_class.h>
13+
1314
#include <util/message.h>
1415
#include <util/mp_arith.h>
1516
#include <util/namespace.h>
17+
#include <util/pointer_expr.h>
1618

1719
typedef interpretert::mp_vectort mp_vectort;
1820

0 commit comments

Comments
 (0)