Skip to content

introduce widen_if_needed #7938

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
Oct 5, 2023
Merged

introduce widen_if_needed #7938

merged 1 commit into from
Oct 5, 2023

Conversation

kroening
Copy link
Member

@kroening kroening commented Oct 5, 2023

This introduces a macro widen_if_needed(s) to replace the common pattern

 #ifdef _MSC_VER
  std::ifstream infile(widen(file));
 #else
  std::ifstream infile(file);
 #endif

by the shorter and less redundant

std::ifstream infile(widen_if_needed(file));

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

This introduces a macro widen_if_needed(s) to replace the common pattern

 #ifdef _MSC_VER
  std::ifstream infile(widen(file));
 #else
  std::ifstream infile(file);
 #endif

by the shorter and less redundant

  std::ifstream infile(widen_if_needed(file));
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (f33b96a) 78.62% compared to head (f06ff71) 78.62%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7938      +/-   ##
===========================================
- Coverage    78.62%   78.62%   -0.01%     
===========================================
  Files         1701     1701              
  Lines       195975   195974       -1     
===========================================
- Hits        154087   154086       -1     
  Misses       41888    41888              
Files Coverage Δ
src/ansi-c/c_preprocess.cpp 35.06% <100.00%> (ø)
src/cbmc/cbmc_parse_options.cpp 78.62% <100.00%> (ø)
src/goto-analyzer/show_on_source.cpp 94.82% <100.00%> (ø)
src/goto-cc/compile.cpp 73.55% <100.00%> (ø)
src/goto-cc/gcc_message_handler.cpp 86.66% <100.00%> (ø)
src/goto-checker/solver_factory.cpp 79.66% <100.00%> (ø)
src/goto-instrument/unwindset.cpp 86.60% <100.00%> (ø)
src/goto-programs/read_goto_binary.cpp 55.66% <100.00%> (ø)
src/cprover/cprover_parse_options.cpp 56.25% <0.00%> (ø)
src/goto-cc/cl_message_handler.cpp 0.00% <0.00%> (ø)
... and 3 more

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

@kroening kroening merged commit faa3144 into develop Oct 5, 2023
@kroening kroening deleted the widen-if-needed branch October 5, 2023 17:46
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.

3 participants