Skip to content

Conversation

@tautschnig
Copy link
Collaborator

We need to remove the const qualifier when the assignment is no longer
performed as part of the declaration. This worked for various types
already, but bit fields had not been considered.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a 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.

We need to remove the const qualifier when the assignment is no longer
performed as part of the declaration. This worked for various types
already, but bit fields had not been considered.
@codecov
Copy link

codecov bot commented Dec 16, 2020

Codecov Report

Merging #5672 (72f5736) into develop (fd8af8a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5672   +/-   ##
========================================
  Coverage    69.44%   69.45%           
========================================
  Files         1243     1243           
  Lines       100612   100614    +2     
========================================
+ Hits         69875    69886   +11     
+ Misses       30737    30728    -9     
Flag Coverage Δ
cproversmt2 43.14% <ø> (ø)
regression 66.34% <100.00%> (+<0.01%) ⬆️
unit 32.28% <50.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/goto-instrument/goto_program2code.cpp 67.52% <100.00%> (+0.99%) ⬆️
src/goto-instrument/dump_c.cpp 74.95% <0.00%> (+0.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd8af8a...72f5736. Read the comment docs.

Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the test cases esp.!

cat "${name}-mod.gb"
mv "${name}.gb" "${name}-mod.gb"
elif echo $args | grep -q -- "--dump-c" ; then
cat "${name}-mod.gb"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to cause issues with other tests / increase the amount of output drastically?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this output is only generated when --dump-c is included in the test options, I think only very few cases (with small source files) will be affected. Thus, we should be fine.

const p
--
This test demonstrates that the constness of struct members has been removed,
which is necessary as the initialisation is not performed in the declaration.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is just one of those unavoidable things as we split an initialisation into DECL and ASSIGN instructions.

@tautschnig tautschnig merged commit e23bf5c into diffblue:develop Dec 16, 2020
@tautschnig tautschnig deleted the dump-c-const branch December 16, 2020 15:10
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.

2 participants