[PATCH] D147991: [LLVM][Casting.h] Fix dyn_cast for std::unique_ptr.
Aman LaChapelle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 18 07:43:41 PDT 2023
bzcheeseman added a comment.
In D147991#4276650 <https://reviews.llvm.org/D147991#4276650>, @zuban32 wrote:
> @bzcheeseman I've updated the test and it passes, i.e. I wasn't able to reproduce the behavior we discussed. It seems modern c++ compilers are able to elide the calls to move constructor in such a code, I tried with gcc 9.4 and Apple aarch64 clang-14 with no success.
This makes me a bit nervous because it feels like undefined behavior unless there's some part of the standard that allows something like this. Do these tests run under ASan/UBSan? Also, I assume you don't get any warnings about use-after-move?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147991/new/
https://reviews.llvm.org/D147991
More information about the llvm-commits
mailing list