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

ansi_c_parsert: construct with message handler #8141

Merged
merged 2 commits into from
Mar 15, 2024

Conversation

tautschnig
Copy link
Collaborator

This both avoids an object of static lifetime as well as it fixes the (transitive) use of the deprecated messaget() constructor.

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

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: Patch coverage is 65.97325% with 229 lines in your changes are missing coverage. Please review.

Project coverage is 79.64%. Comparing base (8560cdc) to head (1f240bc).

Files Patch % Lines
src/ansi-c/scanner.l 27.22% 147 Missing ⚠️
src/ansi-c/parser.y 79.69% 80 Missing ⚠️
src/ansi-c/ansi_c_parser.h 80.00% 1 Missing ⚠️
src/cpp/cpp_language.cpp 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8141      +/-   ##
===========================================
- Coverage    79.65%   79.64%   -0.01%     
===========================================
  Files         1684     1684              
  Lines       195565   195606      +41     
===========================================
+ Hits        155774   155794      +20     
- Misses       39791    39812      +21     

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

Copy link
Collaborator

@feliperodri feliperodri left a comment

Choose a reason for hiding this comment

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

All changes in the contracts wrangler LGTM.

@tautschnig tautschnig self-assigned this Feb 1, 2024
@tautschnig tautschnig force-pushed the cleanup/ansi_c_parsert branch from fbf9498 to e5f6835 Compare February 5, 2024 14:34
@tautschnig tautschnig removed their assignment Feb 5, 2024

virtual void clear() override
void clear() override
Copy link
Member

Choose a reason for hiding this comment

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

❓ Is this function still used anywhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will clean this up across the type hierarchy (removing just this override seems dangerous, as any use of .clear() would just invoke parsert::clear(), which would end up in incomplete cleanup) in a follow-up PR.

The test will sometimes pass, depending on what model the solver
produces. When such a passing model happens to be is produced, it breaks
our checking of "KNOWNBUG" tests.
This both avoids an object of static lifetime as well as it fixes the
(transitive) use of the deprecated messaget() constructor. The C scanner
is now fully reentrant.
@tautschnig tautschnig force-pushed the cleanup/ansi_c_parsert branch from abb26db to 1f240bc Compare March 15, 2024 13:48
@tautschnig tautschnig merged commit 1fd7011 into diffblue:develop Mar 15, 2024
37 of 39 checks passed
@tautschnig tautschnig deleted the cleanup/ansi_c_parsert branch March 15, 2024 15:23
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.

4 participants