Skip to content

Remove {f,F}orall_subtypes #5783

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
Jan 29, 2021
Merged

Conversation

tautschnig
Copy link
Collaborator

This was useful in the past, but with C++-11 we can use a ranged-for to
avoid the iterator altogether.

As subtypes are no longer stored in a named sub (removing the
corresponding #if-0-disabled code), the ranged-for can be used directly
without testing for the existence of subtypes beforehand, as the forall
macro did.

  • 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.

@codecov
Copy link

codecov bot commented Jan 25, 2021

Codecov Report

Merging #5783 (22a59fb) into develop (2c11501) will decrease coverage by 0.00%.
The diff coverage is 87.09%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5783      +/-   ##
===========================================
- Coverage    69.67%   69.67%   -0.01%     
===========================================
  Files         1242     1242              
  Lines       100886   100885       -1     
===========================================
- Hits         70291    70290       -1     
  Misses       30595    30595              
Flag Coverage Δ
cproversmt2 43.37% <44.82%> (-0.01%) ⬇️
regression 66.63% <87.09%> (-0.01%) ⬇️
unit 32.30% <34.48%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/ansi-c/ansi_c_parser.cpp 84.00% <0.00%> (ø)
src/cpp/template_map.cpp 50.00% <0.00%> (ø)
src/util/type.h 100.00% <ø> (ø)
src/ansi-c/ansi_c_convert_type.cpp 82.63% <100.00%> (ø)
src/ansi-c/c_storage_spec.cpp 96.77% <100.00%> (ø)
src/ansi-c/type2name.cpp 95.45% <100.00%> (-0.05%) ⬇️
src/cpp/cpp_declaration.cpp 61.11% <100.00%> (ø)
src/cpp/cpp_storage_spec.cpp 100.00% <100.00%> (ø)
src/cpp/cpp_typecheck_compound_type.cpp 85.69% <100.00%> (ø)
src/goto-instrument/dump_c.cpp 76.89% <100.00%> (ø)
... and 3 more

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 2c11501...22a59fb. Read the comment docs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems ok

This was useful in the past, but with C++-11 we can use a ranged-for to
avoid the iterator altogether.

As subtypes are no longer stored in a named sub (removing the
corresponding #if-0-disabled code), the ranged-for can be used directly
without testing for the existence of subtypes beforehand, as the forall
macro did.
@tautschnig tautschnig merged commit 3d8e181 into diffblue:develop Jan 29, 2021
@tautschnig tautschnig deleted the forall-subtypes branch January 29, 2021 19:33
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.

6 participants