[PATCH] D105756: [clang] C++98 implicit moves are back with a vengeance
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 8 15:13:03 PDT 2021
mizvekov added a comment.
In D105756#2988022 <https://reviews.llvm.org/D105756#2988022>, @NoQ wrote:
> I don't think this is intended. @mizvekov, do you think you can add more hard checks to make sure it's constrained to C++? (Or maybe there's another, more precise solution?)
Hello! Thanks for reporting this.
The double implicit lvalue-to-rvalue cast is an unfortunate consequence of some technical debt around the different ways we handle the implicit return type on blocks.
But I don't think it's incorrect as in it actually producing program with different semantics.
Does it actually affect you in your use cases besides the AST? Is this important to you for external semantic analysis reasons or something?
Removing the xvalue cast on non CplusPlus is simple, the bigger issue here is why we are doing this, specially as it will affect what test cases we create for this change.
If this is an issue, is it serious enough to consider getting the fix into 13.0.0 at this stage?
The nrvo is a separate thing, and again I thin it's harmless, or at least a little beneficial. With it, you are avoiding an extra copy when returning these values, and it comes straight from the frontend, independent of any optimization passes later.
Why is this undesirable?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105756/new/
https://reviews.llvm.org/D105756
More information about the cfe-commits
mailing list