Skip to content

ansi-c: more use of conditional_keyword #8625

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
Apr 10, 2025
Merged

Conversation

kroening
Copy link
Member

@kroening kroening commented Apr 9, 2025

This replaces further instances of conditional keywords in the ANSI-C scanner by conditional_keyword(...).

  • 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/
  • n/a 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.

This replaces further instances of conditional keywords in the ANSI-C
scanner by conditional_keyword(...).
@kroening kroening force-pushed the c-conditional-keyword branch from eb41931 to d948592 Compare April 9, 2025 21:19
@kroening kroening marked this pull request as ready for review April 9, 2025 21:33
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 55.81395% with 76 lines in your changes missing coverage. Please review.

Project coverage is 80.38%. Comparing base (cbdab7f) to head (d948592).
Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
src/ansi-c/scanner.l 55.81% 76 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8625      +/-   ##
===========================================
+ Coverage    80.36%   80.38%   +0.02%     
===========================================
  Files         1686     1686              
  Lines       206799   206764      -35     
  Branches        84       75       -9     
===========================================
+ Hits        166200   166215      +15     
+ Misses       40599    40549      -50     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

else
{ loc(); return TOK_BOOL; }
}
"_Bool" { return conditional_keyword(!PARSER.cpp98, TOK_BOOL); }
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 offline: we really should rename PARSER.cpp98 to something like PARSER.cpp98_or_later as otherwise this is very confusing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do as separate PR.

@kroening kroening merged commit 0b000a3 into develop Apr 10, 2025
39 of 41 checks passed
@kroening kroening deleted the c-conditional-keyword branch April 10, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants