We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 549d138 + 039ef79 commit d197e6eCopy full SHA for d197e6e
src/util/json_expr.cpp
@@ -37,12 +37,11 @@ static exprt simplify_json_expr(
37
38
if(type.id()==ID_pointer)
39
{
40
- const irep_idt &value=to_constant_expr(src).get_value();
+ const constant_exprt &c = to_constant_expr(src);
41
42
if(
43
- value != ID_NULL &&
44
- (value != std::string(value.size(), '0') ||
45
- !config.ansi_c.NULL_is_zero) &&
+ c.get_value() != ID_NULL &&
+ (!c.value_is_zero_string() || !config.ansi_c.NULL_is_zero) &&
46
src.operands().size() == 1 &&
47
to_unary_expr(src).op().id() != ID_constant)
48
// try to simplify the constant pointer
0 commit comments