[PATCH] D99005: [clang] Implement P2266 Simpler implicit move
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 6 04:15:51 PDT 2021
aaron.ballman added a comment.
In D99005#2844365 <https://reviews.llvm.org/D99005#2844365>, @mizvekov wrote:
> But is this example a reduction from a real world code base?
> The committee wants feedback and we are interested how hard you believe this change affects you.
This is an example that also appears to be impacted by this change:
struct C {
C();
C(C &c1);
};
void foo()
{
try {
C c1;
throw c1;
}
catch (C c2) {
throw;
}
}
https://godbolt.org/z/dvEbv7GKo
I'm not certain if this is as expected of an issue, though. In the original example, `C` carried state that was set up after initialization but was relying on the fallback to the non-idiomatic copy constructor when doing the `throw`. WDYT?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99005/new/
https://reviews.llvm.org/D99005
More information about the cfe-commits
mailing list