Skip to content

Remove deprecated is_null_pointer #8665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/util/expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ bool exprt::is_zero() const
}
else if(type_id==ID_pointer)
{
return is_null_pointer(constant);
return constant.is_null_pointer();
}
}

Expand Down
5 changes: 0 additions & 5 deletions src/util/expr_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,3 @@ exprt make_and(exprt a, exprt b)
}
return and_exprt{std::move(a), std::move(b)};
}

bool is_null_pointer(const constant_exprt &expr)
{
return expr.is_null_pointer();
}
6 changes: 0 additions & 6 deletions src/util/expr_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,4 @@ constant_exprt make_boolean_expr(bool);
/// return the other expression. If one is `false` returns `false`.
exprt make_and(exprt a, exprt b);

/// Returns true if \p expr has a pointer type and a value NULL; it also returns
/// true when \p expr has value zero and NULL_is_zero is true; returns false in
/// all other cases.
DEPRECATED(SINCE(2024, 9, 10, "use constant_exprt::is_null_pointer() instead"))
bool is_null_pointer(const constant_exprt &expr);

#endif // CPROVER_UTIL_EXPR_UTIL_H
Loading