Skip to content

Introduce reference to avoid unneeded copy. #5524

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 15, 2020

Conversation

NlightNFotis
Copy link
Contributor

@NlightNFotis NlightNFotis commented Oct 14, 2020

Previously this broke the build on macOS, because the compiler was complaining about creating a copy of a const std::pair - which
registered as an error (because of -Werror) - on Apple Clang 12.0.0.

  • 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.
  • 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).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Previously this broke the build on macOS,
because the compiler was complaining about
creating a copy of a const std::pair - which
registered as an error (because of -Werror).
Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM. Reports like this make me wonder though if there's a way to tell compilers you’re intentionally making a copy. I guess you wouldn't do that too often and having an extra assignment statements in those cases should be sufficient to signal this to developers and compilers?

@codecov
Copy link

codecov bot commented Oct 14, 2020

Codecov Report

Merging #5524 into develop will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5524   +/-   ##
========================================
  Coverage    68.40%   68.40%           
========================================
  Files         1187     1187           
  Lines        98090    98090           
========================================
  Hits         67102    67102           
  Misses       30988    30988           
Flag Coverage Δ
#cproversmt2 42.97% <ø> (ø)
#regression 65.55% <100.00%> (ø)
#unit 32.25% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
jbmc/src/java_bytecode/lambda_synthesis.cpp 97.96% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 31f73e1...0559972. Read the comment docs.

@NlightNFotis NlightNFotis merged commit 8fae794 into diffblue:develop Oct 15, 2020
@NlightNFotis NlightNFotis deleted the fix_macos_build branch October 15, 2020 09:44
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