Skip to content

Fix pessimizing move warning - #498

Merged
JohanMabille merged 1 commit into
compiler-research:mainfrom
mcbarton:pessimizing-move-warning
Oct 14, 2026
Merged

JohanMabille merged 1 commit into
compiler-research:mainfrom
mcbarton:pessimizing-move-warning

Conversation

@mcbarton

Copy link
Copy Markdown
Collaborator

This PR fixes the following warning (found by accident while looking into something else)

xholder.cpp:37:35: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
   37 |         : p_holder(rhs.p_holder ? std::move(rhs.p_holder->clone()) : nullptr)
      |                                   ^

xholder.cpp:37:35: note: remove std::move call here
   37 |         : p_holder(rhs.p_holder ? std::move(rhs.p_holder->clone()) : nullptr)

@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@codecov-commenter

codecov-commenter commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.84%. Comparing base (cc947d0) to head (5e4a1c5).

Files with missing lines Patch % Lines
src/xholder.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #498   +/-   ##
=======================================
  Coverage   72.84%   72.84%           
=======================================
  Files          18       18           
  Lines        1204     1204           
  Branches      113      113           
=======================================
  Hits          877      877           
  Misses        327      327           
Files with missing lines Coverage Δ
src/xholder.cpp 64.28% <0.00%> (ø)
Files with missing lines Coverage Δ
src/xholder.cpp 64.28% <0.00%> (ø)
🚀 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.

@mcbarton
mcbarton requested a review from JohanMabille October 14, 2026 09:05
@mcbarton
mcbarton force-pushed the pessimizing-move-warning branch from 567a300 to 5e4a1c5 Compare October 14, 2026 09:23
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@JohanMabille
JohanMabille merged commit 56e4ade into compiler-research:main Oct 14, 2026
20 checks passed
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