Skip to content
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

Remove qualifierst #8419

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Conversation

tautschnig
Copy link
Collaborator

We only ever inherit from c_qualifierst and can safely avoid the use of dynamic_cast by making expr2ct use c_qualifierst instead of qualifierst. The clone() facility introduced in #1831 (where qualifierst was introduced) remains in place to support derived implementations (like java_qualifierst).

Also, reduce the number of explicit c_qualifierst() calls by making use of convert and convert_with_identifier.

  • 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 only ever inherit from `c_qualifierst` and can safely avoid the use
of `dynamic_cast` by making `expr2ct` use `c_qualifierst` instead of
`qualifierst`. The `clone()` facility introduced in diffblue#1831 (where
`qualifierst` was introduced) remains in place to support derived
implementations (like `java_qualifierst`).

Also, reduce the number of explicit `c_qualifierst()` calls by making
use of `convert` and `convert_with_identifier`.
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 62.96296% with 10 lines in your changes missing coverage. Please review.

Project coverage is 77.95%. Comparing base (3877e0f) to head (eabcf9c).
Report is 2 commits behind head on develop.

Files Patch % Lines
src/ansi-c/c_qualifiers.h 33.33% 4 Missing ⚠️
src/cpp/expr2cpp.cpp 33.33% 4 Missing ⚠️
src/ansi-c/expr2c.cpp 80.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8419      +/-   ##
===========================================
+ Coverage    77.94%   77.95%   +0.01%     
===========================================
  Files         1726     1726              
  Lines       189621   189591      -30     
  Branches     18247    18276      +29     
===========================================
- Hits        147792   147791       -1     
+ Misses       41829    41800      -29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tautschnig tautschnig assigned TGWDB and unassigned kroening Aug 20, 2024
@tautschnig tautschnig merged commit d69e0d2 into diffblue:develop Aug 20, 2024
38 of 40 checks passed
@tautschnig tautschnig deleted the expr2c-no-dynamic_cast branch August 20, 2024 21:15
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