-
Notifications
You must be signed in to change notification settings - Fork 274
Remove unneeded class hierarchy from resolve_inherited_componentt #5118
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
Remove unneeded class hierarchy from resolve_inherited_componentt #5118
Conversation
d178bfc
to
57bd05e
Compare
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 57bd05e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/128288014
const std::vector<irep_idt> parents = | ||
make_range(to_struct_type(current_class_symbol_it->second.type).bases()) | ||
.map([](const struct_typet::baset &base) { | ||
return base.type().get_identifier(); |
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.
💡 the vector is not strictly necessary here, you could have used auto
to have it as a range instead
57bd05e
to
3600f70
Compare
This means it can be used even in settings where a class hierarchy isn't readily available. The class hierarchy was only being used to find parents, which are easily available from the class type directly, so it wasn't providing any benefit. (It would have been different if we needed to find children.)
3600f70
to
0c9a5bc
Compare
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 0c9a5bc).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/128332467
Codecov Report
@@ Coverage Diff @@
## develop #5118 +/- ##
===========================================
+ Coverage 69.71% 69.71% +<.01%
===========================================
Files 1322 1322
Lines 109429 109432 +3
===========================================
+ Hits 76287 76290 +3
Misses 33142 33142
Continue to review full report at Codecov.
|
This means it can be used even in settings where a class hierarchy isn't
readily available. The class hierarchy was only being used to find
parents, which are easily available from the class type directly, so it
wasn't providing any benefit. (It would have been different if we needed
to find children.)