Skip to content

goto_programt::get_target: fix const-ness of operations #7322

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

Merged
merged 1 commit into from
Nov 12, 2022

Conversation

tautschnig
Copy link
Collaborator

Return a const iterator in a const context to avoid providing a means to modify instructions in a goto program despite being in a const context.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Return a const iterator in a const context to avoid providing a means to
modify instructions in a goto program despite being in a const context.
@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Base: 78.28% // Head: 78.28% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (943333a) compared to base (a295651).
Patch coverage: 82.75% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #7322   +/-   ##
========================================
  Coverage    78.28%   78.28%           
========================================
  Files         1642     1642           
  Lines       190004   190012    +8     
========================================
+ Hits        148744   148757   +13     
+ Misses       41260    41255    -5     
Impacted Files Coverage Δ
src/goto-instrument/contracts/contracts.h 100.00% <ø> (ø)
src/goto-programs/graphml_witness.cpp 52.94% <0.00%> (-0.15%) ⬇️
src/goto-programs/interpreter.cpp 52.38% <0.00%> (+0.17%) ⬆️
src/util/expr_initializer.cpp 85.10% <80.00%> (+1.77%) ⬆️
jbmc/src/java_bytecode/expr2java.cpp 86.25% <93.75%> (ø)
src/ansi-c/c_typecheck_initializer.cpp 76.57% <100.00%> (+0.04%) ⬆️
src/ansi-c/expr2c.cpp 67.33% <100.00%> (-0.02%) ⬇️
src/goto-instrument/contracts/contracts.cpp 95.09% <100.00%> (+0.06%) ⬆️
src/goto-instrument/dump_c.cpp 79.97% <100.00%> (-0.03%) ⬇️
src/goto-programs/goto_convert.cpp 88.09% <100.00%> (ø)
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kroening kroening merged commit 1199c56 into diffblue:develop Nov 12, 2022
@tautschnig tautschnig deleted the cleanup/get_target-typing branch November 12, 2022 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants