As briefly discussed in https://reviews.llvm.org/D136013
This creates a temporary local variable and puts the RVO pointer on the stack for the function to write the result into.
Paths
| Differential D136457
[clang][Interp] Fix discarding non-primitive function call return values ClosedPublic Authored by tbaeder on Oct 21 2022, 8:35 AM.
Details Summary As briefly discussed in https://reviews.llvm.org/D136013 This creates a temporary local variable and puts the RVO pointer on the stack for the function to write the result into.
Diff Detail Event Timeline
tbaeder marked an inline comment as done. tbaeder added a child revision: D134859: [clang][Interp] Implement basic support for floating point values.Oct 28 2022, 8:38 AM This revision is now accepted and ready to land.Nov 22 2022, 5:40 AM This revision was landed with ongoing or failed builds.Nov 30 2022, 12:19 AM Closed by commit rGafa60d08a2d4: [clang][Interp] Fix discarding non-primitive function call return values (authored by tbaeder). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 469628 clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/test/AST/Interp/records.cpp
|
Could you alternatively use Func->hasRVO()?