-
Notifications
You must be signed in to change notification settings - Fork 284
introduce API for goto_instructiont::source_location #6400
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
216855b to
f61a64d
Compare
Codecov Report
@@ Coverage Diff @@
## develop #6400 +/- ##
========================================
Coverage 75.97% 75.98%
========================================
Files 1523 1523
Lines 164201 164227 +26
========================================
+ Hits 124758 124780 +22
- Misses 39443 39447 +4
Continue to review full report at Codecov.
|
| return _source_location; | ||
| } | ||
|
|
||
| source_locationt &source_location_nonconst() |
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.
Is the idea to use a _nonconst suffix now consistently for this purpose?
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.
Yes. I don't love it, but the alternative would be to add as_const everywhere else.
The goal would be to avoid any usage of _nonconst, whenever feasible, and use the constructors instead.
martin-cs
left a comment
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 bits I am maintainer for look fine.
| if( | ||
| i_it->is_assert() && | ||
| i_it->source_location().get_property_class() == ID_precondition) | ||
| result.push_back(i_it); |
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.
Nit picking: add braces for the body.
| if( | ||
| instruction.is_assert() && | ||
| instruction.source_location().get_property_class() == ID_precondition) | ||
| instruction.type=LOCATION; |
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.
Nit picking: add braces for the body.
f61a64d to
11c711f
Compare
This introduces two methods for wrapping the accesses to goto_instructiont::source_location. The field is now protected to prevent direct access.
11c711f to
8e14af7
Compare
This introduces two methods for wrapping the accesses to
goto_instructiont::source_location. The field is now protected to preventdirect access.