Skip to content

Conversation

@kroening
Copy link
Collaborator

@kroening kroening commented Sep 8, 2022

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

@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Merging #7110 (8b7b7a9) into develop (e35425e) will increase coverage by 0.00%.
The diff coverage is 82.16%.

@@           Coverage Diff            @@
##           develop    #7110   +/-   ##
========================================
  Coverage    77.91%   77.92%           
========================================
  Files         1576     1576           
  Lines       181611   181645   +34     
========================================
+ Hits        141511   141541   +30     
- Misses       40100    40104    +4     
Impacted Files Coverage Δ
src/cpp/cpp_declarator_converter.cpp 79.66% <0.00%> (ø)
src/cpp/cpp_typecheck_resolve.cpp 70.00% <0.00%> (ø)
src/cpp/template_map.cpp 57.85% <0.00%> (ø)
src/util/xml.cpp 73.88% <ø> (ø)
src/cpp/cpp_convert_type.cpp 72.72% <50.00%> (-0.69%) ⬇️
src/cpp/cpp_typecheck_code.cpp 80.41% <50.00%> (-0.26%) ⬇️
src/cpp/cpp_typecheck_type.cpp 75.75% <66.66%> (ø)
src/ansi-c/parser.y 80.47% <76.00%> (ø)
src/cpp/cpp_typecheck_conversions.cpp 84.95% <80.00%> (-0.05%) ⬇️
src/cpp/cpp_typecheck_enum_type.cpp 78.51% <83.33%> (ø)
... and 16 more

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

This commit replaces uses of the nonconst typet::subtype() by casting the
type to the applicable subtype, and then using the appropriate accessor
method.
Comment on lines 66 to 71
public:
typet &add_subtype()
Copy link
Collaborator

Choose a reason for hiding this comment

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

As discussed out of band: it would be nice to have a comment that explains when (not) to use this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

This introduces a new method typet::add_subtype(), identical in behavior to
typet::subtype() nonconst, to allow current users of this method to add a
subtype to a given type.  The name of the method reflects that the subtype
is added.
This commit replaces uses of typet::subtype() nonconst by
typet::add_subtype(), which better reflects the action taken.
This protects typet::subtype() nonconst.  There are no remaining uses of the
method outside of the typet class hierarchy.
@peterschrammel peterschrammel removed their assignment Sep 9, 2022
@kroening kroening merged commit 62f1d5a into develop Sep 9, 2022
@kroening kroening deleted the add_subtype branch September 9, 2022 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants