Fix JitCall codegen for move-only by-value arguments - #1105
Open
aaronj0 wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1105 +/- ##
==========================================
+ Coverage 87.74% 87.78% +0.04%
==========================================
Files 23 23
Lines 6429 6445 +16
==========================================
+ Hits 5641 5658 +17
+ Misses 788 787 -1
🚀 New features to boost your workflow:
|
| get_type_as_string(QT, type_name, C, Policy); | ||
| } | ||
|
|
||
| static bool IsCopyConstructorDeleted(QualType QT) { |
Contributor
There was a problem hiding this comment.
warning: 'IsCopyConstructorDeleted' is a static definition in anonymous namespace; static is redundant here [readability-static-definition-in-anonymous-namespace]
Suggested change
| static bool IsCopyConstructorDeleted(QualType QT) { | |
| type_name, C, Policy); |
aaronj0
force-pushed
the
moveonly-byvalue-args
branch
from
September 2, 2026 16:59
2d48ed5 to
8de4f61
Compare
make_narg_ctor never moved by-value arguments, and make_narg_call guessed with triviality bits that are not comparable across standard libraries: MSVC's std::unique_ptr has a non-trivial deleted copy constructor, so its wrappers passed lvalues and failed to compile. Check the actual copy constructor at both sites, as TClingCallFunc does, completing the parameter type through GetOrForceDefinition first; a type with no reachable definition is assumed copyable and the wrapper compile reports otherwise.
aaronj0
force-pushed
the
moveonly-byvalue-args
branch
from
September 3, 2026 12:43
8de4f61 to
e1352ec
Compare
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on TClingCallFunc. make_narg_ctor never moved by-value arguments, and make_narg_call used a heuristic with triviality bits which is not comparable across standard libraries. Check the actual copy constructor at both sites, as TClingCallFunc does, completing the parameter type through GetOrForceDefinition first; a type with no reachable definition is assumed copyable and the wrapper compile reports otherwise.
Supersedes #971 (also addresses the review comments) as this PR is a superset of that one:
MSVC's std::unique_ptr has a non-trivial deleted copy constructor, so check assumes "don't move", passes lvalues, and fails compilation on Windows (RNTupleWriter::Append(std::unique_ptr)). #971 alone would not have fixed it.
Fixes failures in the ROOT migration.