-
Notifications
You must be signed in to change notification settings - Fork 277
member_exprt now checks type of compound operand #6949
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the need for unchecked
exclusively stems from tests? Can we just fix them instead?
5009854
to
716545f
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6949 +/- ##
===========================================
+ Coverage 77.85% 77.86% +0.01%
===========================================
Files 1569 1569
Lines 180670 180821 +151
===========================================
+ Hits 140662 140801 +139
- Misses 40008 40020 +12
Continue to review full report at Codecov.
|
716545f
to
80e5b1a
Compare
80e5b1a
to
136ae1c
Compare
136ae1c
to
3c91a04
Compare
3c91a04
to
352832a
Compare
352832a
to
11089b4
Compare
@@ -55,7 +59,7 @@ TEST_CASE("Tracking object base expressions", "[core][smt2_incremental]") | |||
address_of_exprt{index_exprt{foo, index}, pointer_type}, bar_address}, | |||
notequal_exprt{ | |||
address_of_exprt{ | |||
member_exprt{foo, "baz", unsignedbv_typet{8}}, pointer_type}, | |||
member_exprt::unchecked(foo, "baz", unsignedbv_typet{8}), pointer_type}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will still need fixing?
11089b4
to
88d3b5e
Compare
This commit adds a precondition to the constructors of member_exprt that enforces that the compound operand has one of the compound types.
88d3b5e
to
55fc192
Compare
@@ -12,41 +12,12 @@ | |||
#include <string> | |||
#include <utility> | |||
|
|||
TEST_CASE("find_object_base_expression", "[core][smt2_incremental]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomasspriggs is going to re-add a fixed version of this test after this PR has been merged.
This commit adds a precondition to the constructors of
member_exprt
thatenforces that the compound operand has one of the compound types.
A legacy constructor is offered to ease the transition.